react-use has various hooks that you can use with ease.
Hooks are functions that let you “hook into” React state and lifecycle features from function components. Hooks don’t work inside classes — they let you use React without classes.
In this example, we'll use
usePrevious hooks in order to tracks
Window dimensions and get the previous state with ease.
If you didn't choose the plugin during project creation phase, you can follow the instructions below to add it.