DEV Community

Discussion on: React - how to make left-side animated menu

Collapse
 
diraskreact profile image
Dirask-React

From the App function, only the 'recipe' for rendering a new component is returned.
The react mechanism detects the differences and updates only the things in the DOM tree that are finally changed between the render cycles.
In our case, it is only left style property value (from -300 to 0). It means that nothing else changes on the page in the DOM.

Collapse
 
diraskreact profile image
Dirask-React

The transition style property is always assigned to the DOM element (menu).