From the course: Advanced Animations and Interactions with Framer X

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Finalize code for interactions

Finalize code for interactions - Framer X Tutorial

From the course: Advanced Animations and Interactions with Framer X

Start my 1-month free trial

Finalize code for interactions

- [Instructor] Let's finish working on our code example, and then test it. So let's get back to our file here, details.tsx, and we're going to go inside of the function, so you want to go inside of those two curly braces here, so where it says return, you want to write the rest of the function inside of that return statement. So the next thing we're going to do is create an onTap event, so when we tap on that details, or save details for future, we want to scale it. So what we're going to do is first do an onTap, so whenever we do a tap it's going to do whatever we want inside of that tap event, so what we're going to do is first create a variable that we'll call toggle, and then leverage the toggle false statement here, so the property toggle and use the value false. So what we're going to do is do data.toggle. Okay, then what we need to do is use the data.scale, and validate, so we're doing a shortened if statement here, so…

Contents