OkkarMin / where-to-mug

Where To Mug is a tool to help you determine which tutorial rooms are free in NTU
https://wheretomug.ml
4 stars 3 forks source link

Improve performance when displaying free room cards #2

Closed OkkarMin closed 3 years ago

OkkarMin commented 3 years ago

Currently, the app is slow to respond to filter

OkkarMin commented 3 years ago

@dannyyys Check out the branch https://github.com/OkkarMin/where-to-mug/tree/perf-preventUnnecessaryRerenders

Preview: https://where-to-mug-q2rfojucy-okkar.vercel.app/

Note: As suggested by @HJunyuan, this branch introduced usage of React.memo and useCallback to prevent unwanted renders. Taking pointers from this and this article

dannyyys commented 3 years ago

@dannyyys Check out the branch https://github.com/OkkarMin/where-to-mug/tree/perf-preventUnnecessaryRerenders

Preview: https://where-to-mug-q2rfojucy-okkar.vercel.app/

Note: As suggested by @HJunyuan, this branch introduced usage of React.memo and useCallback to prevent unwanted renders. Taking pointers from this and this article

LGTM!!