leva icon indicating copy to clipboard operation
leva copied to clipboard

Advice on moving from dev & useControls to production build

Open wuhhh opened this issue 2 years ago • 2 comments

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!

wuhhh avatar Jan 24 '23 12:01 wuhhh