zekroTJA / shinpuru

シンプル - Discord Bot with role selection, moderation, karma ranking, a starboard, code execution, raid alerting, backups, a web interface, twitch notifications and more!
https://shnp.de
MIT License
187 stars 37 forks source link

Web Interface: Performance Optimizations #409

Open zekroTJA opened 1 year ago

zekroTJA commented 1 year ago

The new web interface is built using React Functional Components.

The problem with functional components in comparison to class components is that performance optimization features like Pure Components can not be used that easily.

Therefore, alternative implementations can be applied to "pure" components like the usage of useMemo() or pure HOCs.

See: https://blog.logrocket.com/what-are-react-pure-functional-components/