pmndrs/leva

Advice on moving from dev & useControls to production build

Opened this issue · 2 comments

wuhhh commented

Hi and thank you for all the amazing packages! I have a question on performance and production builds. Is it advisable to completely remove Leva imports and usage of useControls() for managing props before building for production? Is there a performance hit when simply hiding Leva controls and leaving the wrapped prop objects in place?

The reason I ask is that it's a lot of work removing all the useControls hooks, and it would be nice to keep them around for future debugging and tweaking, rather than having to keep adding and removing them. Perhaps there is an even better pattern for working with Leva and managing dev & production builds?

Thanks!

Hi @wuhhh
Have you found a solution to that topic?

Any word on this? Does it affect performance in production, leaving in useControls hooks but hiding Leva?