I'm doing some experimentation with something sort of along these lines via WebRTC.
14 karma · joined June 28, 2018
I'm doing some experimentation with something sort of along these lines via WebRTC.
A way to optimize that approach substantially, while keeping everything else mostly the same, would be to have a setter on the global object, and only re-render the root component when that setter has updated the state.
My suggestion is not a very optimal approach, but probably a lot better than the continuous state loop.
https://speaker.app has a UI I've been prototyping w/ this approach.
I am not affiliated with them but have used them for years and have generally been very happy with it.
Plus you can share drives and USB devices over network.
So I made a little project with the number one goal of being a "ubiquitous" test runner, running tests against real browsers as well as Node.js w/o modifying tests to run between environments.
https://github.com/zenOSmosis/karma-jasmine-typescript-boile...
https://dev.to/jzombie/test-in-nodejs-and-in-browser-with-th...
One slight suggestion to this link is that it have SSL. It seems the benefits of SSL far outweigh the cons, especially when certs can be obtained for free via the likes of Let's Encrypt and the auto-renewing automatically maintained w/ something like: https://hub.docker.com/r/linuxserver/swag
Just a quick note: I followed through to the article on https://fatih-erikli.com/pattern-matching-in-typescript.html and noticed the useEffect call doesn't define a dependency array (not even an empty one), which I believe will make the addEventListener add new listeners on every render. Having a removeEventListener on the return of the useEffect would also ensure it gets cleaned up, if pointed to the same event name / handler.
I assume it was just for illustrative purposes, but felt like I should point it out, regardless.
For example, look at word-break: https://developer.mozilla.org/en-US/docs/Web/CSS/word-break
Imba website looks great and the code examples explain it well. The React-like server-side rendering with the .html imports is phenomenal!
Maybe that makes it officially a standard after all.