
Show HN: The webworkers driven UI framework: neo.mjs v1.2.0 release announcement - tobiu
https://medium.com/@tobiasuhlig/the-webworkers-driven-ui-framework-neo-mjs-v1-2-0-release-announcement-a811ebe47252
======
jhunter1016
I've been a huge fan of webworkers in theory, but I've hated implementing
them. The (until recent) lack of module support was one problem, but just
getting it all set up, talking to the main thread, etc—it was all so daunting.
This looks promising, though!

~~~
tobiu
Ha, I know the feeling. Rich & I started with the workers implementation back
in 2015. No console errors ;)

What was a huge help is the remotes API (remote method access).

example:
[https://github.com/neomjs/neo/blob/dev/src/main/addon/Styles...](https://github.com/neomjs/neo/blob/dev/src/main/addon/Stylesheet.mjs#L25)

createStyleSheet() is defined inside this class which (optionally) runs inside
the main thread and is exposed as a remote method to the App worker.

Now, when you are working inside the App worker scope, you can simply use it
as a promise:

Neo.main.addons.Stylesheet.createStyleSheet(opts).then(data) { // do something
}

------
tobiu
Quick heads up, just updated:

[https://github.com/neomjs/workspace](https://github.com/neomjs/workspace)

So, in case "npx neo-app" does not work in your env, you can just clone the
workspace and go from there.

Option 3 is to clone the neo.mjs repo, and use the create-app program.

------
keckeroo
Have been following this budding framework for a bit now and finally got my
first app up and running with a single command. I have to admit it was very
simple to get going, now to dive into the docs and see what's under the hood!

