3 ms·
For the note: Sciter ( https://sciter.com https://sciter.com ) implements CalDOM features out of the box. But better. In Sciter DOM and vDOM are equally honore
by c-smile 5y ago
For the note: Sciter ( https://sciter.com https://sciter.com ) implements CalDOM features out of the box. But better.
In Sciter DOM and vDOM are equally honored.
This CalDOM's (DOM + vDOM population):
_("#output-1")
.append(
_("+h1").text("Hello World!")
);
In Sciter is
document.$("#output-1")
.append(<h1>Hello World!</h1>)
And this reactive CalDOM:
let app = _().react(
{},
{
render: state =>
_( "+h1", `Hello ${state.name}` ) //This is XSS safe
}
)
_("#output-2", app );
//Edit below line to update state
app.state.name = "World Reactively ";
in Sciter is
class App extends Element {
name = "unknown";
render() {
return <body><h1>Hello { this.name }</h1></body>;
}
}
document.body.patch(<App />);
document.body.componentUpdate({name:"World Reactively "}); // will invoke render()
- ofrzeta 5y agoNot exactly "minimalistic" or "lightweight, though, is it?
- c-smile 5y ago"Better" here means that JSX and things like element.append(vDOM/JSX expr/) and Element.patch(vDOM/JSX expr/) are implemented natively - does not need any library at all. Consider these features as an idea for browser vendors / W3C to extend DOM that we all use. With these features (JSX & element.patch(vdom)) we don't need whole class of JS frameworks like React, PReact, Mithril. Vanilla JS (ES2020 spec) can be used instead. See: https://github.com/c-smile/sciter-js-sdk/tree/main/docs/md/reactor https://github.com/c-smile/sciter-js-sdk/tree/main/docs/md/r...
- tobr 5y ago> But better. This blunt dismissal is very rude when you don’t even mention that you are the author of sciter.
- c-smile 5y agoMy pardon. Yes, I am an author of Sciter.
- Piisamirotta 5y agoYep I was thinking the same. Quite an idiot way to advertise your own product. I'll leave that link untouched.
- GirkovArpa 5y agoSciter is really great.
- deleted 5y ago[deleted]
- ctvo 5y agoDid you forget to add that your library has a licensing cost? You don't get access to the source code unless you pay.
- c-smile 5y agoSciter is free if it is used in binary form. Same thing as Google Chrome and MS Edge.