spotty-amberS
Refine3y ago
9 replies
spotty-amber

How to use react router lazy for routes?

I want to use the react router lazy api to load the components on route as example here https://reactrouter.com/en/main/route/lazy. How to achieve this is there a way to it?

I want this because my bundle size is exceeding the required limit of 500 KB and also I am having a performance issues some times. Any suggestions on code-splitting using dynamic import would also be a great help for me.
Was this page helpful?