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.
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.The
transition
style property is always assigned to the DOM element (menu).