Lesson 4/5

Let's do a small refactor

Refactoring your code can feel a little bit intimidating. Where do you start, and what if I break something?

Despite that, refactoring is a very important skill to learn. I think I’ve learned the most about programming by refactoring my own and other people’s code.

Let’s refactor some code together

Since you just learned about motion variants, what better way than to pick an existing animation and refactor it to use motion variants?

This example already has quite a bit of code, so let me first talk you through wat you see, before we start refactoring.

Unlock the full lesson with PRO

Want to read the full lesson? Join Frontend.FYI PRO.

PRO is a one time purchase of €149 that gives you lifetime access to this course, any courses released in the future, and so much more!