Seems to use Flow instead of Typescript. I wish MS and FB just merged their projects already. Really unnecessary friction when their syntax is 90% the same AFAICT.
I'll use anything that the author of this article (Leo Horie) releases or is attached too. He is one of the greatest minds in JavaScript of this generation. After Angular, Vue and React I stumbled upon his framework Mithril.js and it was like I stumbled across the shroud of fucking turin, that framework is true poetry.
The Fusion plugin system is rather powerful and enables colocation of related/coupled code that would normally be spread across several places. For example, the Styletron plugin for Fusion (an integration for a CSS-in-JS implementation) will do several things:<p>* Wrap the application component tree in a React context provider component (which provides an instance that components will render styles into)<p>* On the server, extract rendered styles after SSR from provided instance and add necessary markup into the server-rendered page<p>* On the client, hydrate the provided instance from the server-rendered styles<p>* On the server and in development, set up a route handler that serves two assets, a web worker implementation and associated WebAssembly binary [1]<p>* On the client and in development, fetch and execute the web worker. Normally, this would be a somewhat difficult integration because of CSP-related issues with web workers, but because the plugin sets up its own route handlers, the requests will be same-origin, sidestepping most CSP issues that normally arise. Additionally, Fusion plugins can also modify response headers for requests, so if needed, CSP headers could also be set appropriately.<p>All the code to do this actually is related to a single concern, namely styling, but in a universal web app, such things typically requires the involvement of many different parts of the application lifecycle and both server and client code. Fusion plugins allow you to slice up the independent parts of your application logic in this fashion, somewhat analogous to how colocating HTML/CSS/JS for individual components in CSS-in-JSX is often much nicer than splitting apart component implementations across separate HTML/CSS/JS files.<p>[1]: This web worker generates debug CSS at runtime that maps rendered CSS to the source styled component definitions in JS using source maps, making it easier to reverse map the rendered CSS to the source CSS-in-JS when inspecting the DOM with the styles pane. <a href="https://github.com/rtsao/css-to-js-sourcemap" rel="nofollow">https://github.com/rtsao/css-to-js-sourcemap</a>
I've been working with the Fusion.js team for the last year now, and I think it's evolved into a really interesting and modern web framework. Internally we've started rolling this framework to a few dozen web applications, and soon we will have hundreds of web apps running it. I think it's a great choice to use as a base for high-performance and complex web applications.
Looks like a competitor to next.js, and from their docs built on koa.<p>It’s nice to see more libs in this space, but it seems a little over complicated to me with the “plugin” style arch.
The idea behind this looks awesome - if I understand correctly, this is to encourage people to program more to interfaces provided by plugins so that implementations can be swapped more easily. This does not require a type system either to use, which lowers the barrier.<p>The one thing I think should change though is decoupling from requiring Node from the runtime. I think the broader JS ecosystem could benefit from some of the ideas this library seems to promote.
Looks awesome and love the focus on plugins. I also like some of the choices made, Redux, React Router, Security, etc. but going with Flow??<p>Our company has standardized on Typescript, it has practically "won". Unfortunately for me, introducing Flow would get shot down.
Reframe (<a href="https://github.com/reframejs/reframe" rel="nofollow">https://github.com/reframejs/reframe</a>) is an alternative that focuses on flexibility.<p>Fusion.js locks you in, Reframe doesn't.<p>(I'm Reframe's main author.)