Skip to content

How to prevent vnode properties prefixed with underline from being renamed ? #3266

Answered by JoviDeCroock
RRDAWLX asked this question in Q&A
Discussion options

You must be logged in to vote

This file here contains the mapping of said properties, you can build preact with --no-compress if you want to see it without but essentially these are internals and we choose (for library size) not to expose these to the outside world. If we'd keep the original names in there Preact would be a few (50-100'ish) bytes bigger.

I guess learning the implementation is better done through the source code as opposed to actual built code, as built code is tailored towards being optimized which can introduce unreadable parts.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RRDAWLX
Comment options

Answer selected by RRDAWLX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants