Loskir / price-monitor-website-next

https://pricemonit.ru
10 stars 3 forks source link

Refactor product page so that it does not load the price history server-side #14

Closed Loskir closed 1 year ago

Loskir commented 1 year ago

Currently the server waits for the price history request before rendering the page. As it is a slower request, page loading takes longer. And unlike the basic product info, it is not needed on the server side at all.

So it should only happen on the client side.

Option 1: completely refactor the page without effector. Effector proved to be an interesting but completely unnecessary technology in this project.

Option 2: add a client-side page loaded event and reroute the history request using it

Loskir commented 1 year ago

Done in https://github.com/Loskir/price-monitor-website-next/commit/87176062644b336c56a6ed1b1eaac37e1d61a658