3 ms·
> I can interact with it using whatever JS libraries I prefer. Could you give an example with JSX where templating will not cut? > JSX components are function
by daliusd 7y ago
> I can interact with it using whatever JS libraries I prefer.
Could you give an example with JSX where templating will not cut?
> JSX components are functions or classes which are trivially composable.
This is framework's feature IMHO not language's.
> I can type functions and classes with typescript unlike string templates.
Situation where types are important in other frameworks is JS part not templates part. Could you give an example where typing is import purely in component's return value?
- Chyzwar 7y ago> Situation where types are important in other frameworks is JS part not templates part. Could you give an example where typing is import purely in component's return value? You will lose type-safety when composing components in template-based frameworks. It is jsx part where types are most important. Instead of getting runtime errors because you passed wrong props you get instant feedback from tsserver and compile error.
- daliusd 7y agoI have not checked any typescript implementation in svelte but I think this case can be done. The only special case being for cycle. * * I use React with typescript mainly and I understand what you are referring to.