If you are learning React using a book or an online tutorial, you may be in for an unpleasant surprise. One minute you are following along, and then you get pissed off once you realise that the instructions you are following are hopelessly outdated. Even 5-star tutorials are best-selling books won’t protect you from that.
That depends on whether you React component is functional or class-based.
If you are new to React, you may be wondering what that props business is all about. Components make sense. But why do they need props? Why should you use them, or then, or how? After all, you can build a perfectly functioning React application without those pesky props.
Well, you don’t have you use props inside your React components. It is fair that not all the components require props. But still, they are worth understanding. And here is why.
Animating things on the web is a pretty common task. You often need to animate a menu bar sliding from the top, or an input field expanding and collapsing when you click a button. But how do you do that?
Maybe there is a library for that? Yes, lots. But which one you should choose? When you are pressed with a deadline, you don’t have time to plough through lots of libraries and their documentation, you just want to know the simplest way to do what you need as simple and as quick as possible.
Fear no more. I will show you everything you need to know to cover most of your React animation requirements. In this article, we will cover CSS Transitions which is the easiest way to animate elements on the web page. Moreover, you will see why CSS transitions are one of the simplest yet coolest techniques on the web.