aadeshkulkarni / figuringout

Blogging + Social Media + AI | Opensource | Javascript | ReactJS | HonoJS | Prisma
https://figuringout.life
MIT License
91 stars 91 forks source link

Performance Optimisation | Code splitting #158

Closed aadeshkulkarni closed 2 months ago

aadeshkulkarni commented 3 months ago

Current

There are different routes in the app. However, React, by default, creates 1 script file which contains code for all routes. This causes performance issue since the size of the bundle is large.

Expectation

Each Route mentioned within App.tsx should be bundled separately. Use code-splitting / Dynamic imports to achieve this.

Stats

Reference:

https://dev.to/franklin030601/code-splitting-in-react-js-4o2g

debopriyobasu commented 2 months ago

If this issue is not assigned to anyone yet, I can take this up. Here is how I plan to proceed:

I confirm that I have no active issues assigned to me currently.

aadeshkulkarni commented 2 months ago

Sounds good. Except that we already have a spinner component. You might want to check that out. Assigning it to you. Please record the before and after metrics to ensure the performance is really optimised.