Earlier quoted context omitted.
I mean, you're welcome to have a look at it https://github.com/IEMLdev/Intlekt-editor An example of how I put together a component is here https://github.com/IEMLdev/Intlekt-editor/blob/master/src/sc... - My "view" function takes a template string and replaces the node's content whenever "render" is triggered. - I create a "model" object which triggers a "render" event anytime it changes. You can also give the model…
That's quite a complicated, embedded framework. If that's "just jQuery", then React is "just ES6". I don't understand the distinction. Every abstraction is built on the layer below. You just rolled your own bespoke one instead of using one that already existed. > I don't see what React offers beyond what you get with a templating language like Handlebars, and a few lines of jQuery for initializing components. You say…
There's no need for a vdom for the most part, template strings and innerHTML are fast enough on their own.
I just find React to be an overly complicated way to achieve its goals.
var model = { text: '' }
var component = $( '.component' ).on( 'render', function() {
$(this).html( `${ model.text }` )
})
update( 'text', 'Hello world' )
function update( key, val ) {
model[ key ] = val;
component.trigger( 'render' )
}
That's React in 8 lines of jQuery. My framework is just a minor extension to this concept.