|
|
|
|
|
by c-smile
1319 days ago
|
|
That's what I did in Sciter: 1. Added element.$("selector") and element.$$("selector") functions. Later one allows to work with JQ sets: for(let el of parent.$$(".child"))
...
2. Added element.on("eventname" [,"selector"], handler) and element.off()These two allow to reduce need for JQuery to almost zero. Also added JSX as a built-in feature to JS/runtime. So, function Child(props) {
return <p>Generated child {props.index}</p>;
}
function Main() {
const list = [1,2,3];
return <main>
{ list.map( el => <Child index={el} /> ) }
</main>
}
// add the list to the DOM:
document.body.append(<Main />);
These three simple things, together with elment.patch(...JSX...) eliminate need for as JQuery as ReactJS almost completely. |
|