How to prevent vnode properties prefixed with underline from being renamed ? #3266
-
The source codes of vnode are like these:
But I find all the properties prefixed with underline are renamed to unreadable ones. Like these:
It is very inconvenient for me to learn the implementation of preact. How can I turn off the renaming feature? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This file here contains the mapping of said properties, you can build preact with 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. |
Beta Was this translation helpful? Give feedback.
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.