Comment on A review of Nim 2: The good and bad with example codeparentComments−summarity1yWrote a post about it here: https://summarity.com/nim-alpine−banashark1yInteresting. So it was 11k for the dropdown component, but if you eschew the std lib inclusion (which sounds fairly impractical), it goes down to 3k.When you have a page with many alpine/nim components like this, how does the size increase relative to the # of components added (roughly of course)?−summarity1yIt does increase but slightly. The biggest increase comes from accidentally using copy semantics, which are Nims default. If you use ref everywhere (which makes sense for JS), Nim will not emit a bunch of deep copy helpers.
Comments
Wrote a post about it here: https://summarity.com/nim-alpine
Interesting. So it was 11k for the dropdown component, but if you eschew the std lib inclusion (which sounds fairly impractical), it goes down to 3k.
When you have a page with many alpine/nim components like this, how does the size increase relative to the # of components added (roughly of course)?
It does increase but slightly. The biggest increase comes from accidentally using copy semantics, which are Nims default. If you use ref everywhere (which makes sense for JS), Nim will not emit a bunch of deep copy helpers.