-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is the purpose of [<Erase>] in Feliz? #40
Comments
This is to reduce the impact of Feliz to bundle size to the minimum. More info here: #1 (comment) |
Thanks! Shouldn't it be on all types, then? E.g. Lines 7 to 8 in 7b92317
|
No, because prop contains at least one member that is not inlined: Souce Because inlining, this member would have a worst impact compare not inlined version. |
Ah, so the general rule in the context of Feliz is "erase only types where ALL members are inline"? |
Yes, in theory, this rule should in 98% (not a precise number 😉 ) reduce the final bundle size. You can always use the REPL if unsure or look at the webpack size output. |
Great, thanks! |
I notice that some types have
[<Erase>]
(but not all; notably, notprop
).https://github.com/Zaid-Ajaj/Feliz/search?q=%5B%3CErase%3E%5D&unscoped_q=%5B%3CErase%3E%5D
What is the point of
[<Erase>]
when members are generally inline anyway?I'm asking because I need to know what to
[<Erase>]
in Feliz.MaterialUI, if anything.The text was updated successfully, but these errors were encountered: