4 ms·
If I read this correctly, all the route components are evaluated (i.e. rendered to virtual DOM) and only then one of them is selected and shown (i.e. rendered t
by janci 4y ago
If I read this correctly, all the route components are evaluated (i.e. rendered to virtual DOM) and only then one of them is selected and shown (i.e. rendered to HTML DOM). This seems utterly inefficient, even for educational example.
- ratww 4y agoYou read that incorrectly. Only the active route component is returned by the Router function, therefore React's render() won't do anything with the others.