Our view is that you get the most value from these restrictions in the application's rendering code.
This means that fairly aggressive limitations feel normal in the context of a template.
These days, React hooks require a linter and storing state in React's runtime through special funcs.
This is also a cool approach, and one that's been pretty influential in the front end space.
To make a long story short, Ember's templates are a standalone render program that runs from the top down in the Glimmer VM, using JavaScript state as inputs.
The earliest versions of Ember had a separation between templates and JS, but data flow between the two was porous, fundamentally sneaking mutation into the template layer.
- largely eliminated two-way state entaglement between JS and the rendering program
- made the difference between arguments (props in react), state, function calls and component invocation obvious as a glance
- overhauled JS state management
Because HTML (and templating concepts) are so widely known, we can get very aggressive in rendering without seeming unfamiliar.
These aren't Rails or PHP templates transplanted into the modern front-end world.
They're a genuinely different attack on the conceptual essence of front-end programming.
We also need to find ways to make any necessary restrictions intuitive enough for developers of diverse experiences to use successfully.
I think the jury's still out on which approach, when fully developed, will prove to result in the more robust applications when built by mere mortals.
The end of 2019 feels like the start of a new wave of experimentation, less encumbered by the history of front end tooling than ever before.
😁😁😁