2 ms·
I made some noise in a Typescript issue to not add more complexity just for React in the core but offer it as a plug-in but that didn’t go anywhere. I do feel
by nojvek 6y ago
I made some noise in a Typescript issue to not add more complexity just for React in the core but offer it as a plug-in but that didn’t go anywhere.
I do feel Typescipt tries to over-accommodate React compared to other frontend frameworks. The jsx code is pretty gnarly in TS and this makes it even more complicated for little gain.
Magic imports are a big no no. The whole idea about import/export syntax is that a module explicitly imports what it uses and other modules can only import what it exports.
I can understand React.createElement -> jsx function. Preact, mihthrill and others use the h function. This already works without new transform.
It seems that with React hooks and special JSX transforms, the authors are trying to prioritize cleverness over simplicity and clarity.
Now every project you have to grapple with the decision “is this automatic or classic?” and what about the next version, is it “super automatic” runtime?