Twitter | Search | |
Dominic Gannaway
I personally think that 2018 will be the year that JavaScript frameworks start to become JavaScript compilers. Here's a sneak peak at what we've been working on in collaboration with the Prepack team:
Reply Retweet Like More
Daveyon Mayne 😻 24 Dec 17
Replying to @trueadm
Bar func doesn't seem to be using the props param. Am I missing something? πŸ€”
Reply Retweet Like
Dominic Gannaway 24 Dec 17
Replying to @sylarruby
the <Bar /> function component gets removed from the output, as does the <Yar /> function component. They're both folded into <Foo />
Reply Retweet Like
Fernando Montoya 24 Dec 17
Replying to @trueadm @sveltejs
Like ?
Reply Retweet Like
Ville M. Vainio 24 Dec 17
Or Angular, or Stencil
Reply Retweet Like
Roman Liutikov 24 Dec 17
Replying to @trueadm
How do you measure at what point it makes sense to inline a component and how large return value can be?
Reply Retweet Like
Dominic Gannaway 24 Dec 17
Replying to @roman01la
At the moment it will attempt to inline everything. Once we inline, we can detect nodes that are similar and re-use the same references plus hoist out nodes.
Reply Retweet Like
Max Stoiber 🐟 24 Dec 17
Replying to @trueadm
Dammnnnnnnn I want this for CSS-in-JS, how can I join this team
Reply Retweet Like
Dominic Gannaway 24 Dec 17
Replying to @mxstbr
You can always contribute to Prepack. It's all open source and I know they'd love more contributors!
Reply Retweet Like
Peter Le Bek 24 Dec 17
Replying to @trueadm
Won’t this make Javascript code harder to read? C++ already has the problem that every codebase seems like it’s written in a different language. Ofc could argue that using a framework in the first place makes it a different language.
Reply Retweet Like
Dominic Gannaway 24 Dec 17
Replying to @_lebek
It will be harder to read, but like you mention, that's already the case. I expect the compiler changes to mostly for prod to begin with. Once dev tools catch up (like React dev tools) to fill in that gap, I expect it to become easier.
Reply Retweet Like