facebook / jsx

The JSX specification is a XML-like syntax extension to ECMAScript.
http://facebook.github.io/jsx/
1.96k stars 133 forks source link

Proposal: Need of some MVC architecture. #72

Closed ashokkumarsand closed 7 years ago

ashokkumarsand commented 7 years ago

The rendering javascript with the HTML is too complex. And classes are too complex with the many methods. If we have annotations, like initialization of the application. Run time props injections. Also accessibility support. Key event support @click, @keydown, @load, @render, @mount, @unmount, @component, @model and etc.

In the rendering of component call many times of render() method, It needs some lazy rendering technique which can calculate all change after that it apply in render(). Binding state to props is also a very bad approach

ashokkumarsand commented 7 years ago

@Template("<MyComponent attribute1=""/>") class Mew { //code @render render(@inject state) { // write your extra jsx here } }

sebmarkbage commented 7 years ago

Seems more like a suggestion for another library, decorators or both. I'm going to close this out since I don't see anything directly actionable to the JSX spec (which can be used by any MVC architecture, or not).