Need advice about which tool to choose?Ask the StackShare community!
React.js Boilerplate vs Blazejs: What are the differences?
Developers describe React.js Boilerplate as "🔥 Quick setup for performance orientated, offline-first React.js apps". Quick setup for new performance orientated, offline–first React.js applications featuring Redux, hot–reloading, PostCSS, react-router, ServiceWorker, AppCache, FontFaceObserver and Mocha. On the other hand, Blazejs is detailed as "*Powerful library for creating user interfaces *". It is a powerful library for creating user interfaces by writing reactive HTML templates. Compared to using a combination of traditional templates and jQuery, it eliminates the need for all the “update logic” in your app that listens for data changes and manipulates the DOM.
React.js Boilerplate and Blazejs can be categorized as "Javascript UI Libraries" tools.
Some of the features offered by React.js Boilerplate are:
- Using react-transform-hmr, your changes in the CSS and JS get reflected in the app instantly without refreshing the page. That means that the current application state persists even when you change something in the underlying code! For a very good explanation and demo, watch Dan Abramov himself talking about it at react-europe.
- Redux is a much better implementation of a flux–like, unidirectional data flow. Redux makes actions composable, reduces the boilerplate code and makes hot–reloading possible in the first place. For a good overview of redux, check out the talk linked above or the official documentation!
- Babel is a modular JavaScript transpiler that helps to use next generation JavaScript and more, like transformation for JSX, hot loading, error catching etc. Babel has a solid ecosystem of offical preset and plugins.
On the other hand, Blazejs provides the following key features:
- Create user interfaces
- Compiles template files into JavaScript code
- Provides a compiler toolchain
React.js Boilerplate and Blazejs are both open source tools. It seems that React.js Boilerplate with 23.2K GitHub stars and 4.69K forks on GitHub has more adoption than Blazejs with 438 GitHub stars and 89 GitHub forks.
React was a very contentious decision among the Meteor community. We started off with Blazejs, which itself was based off of Handlebars. We liked the HTML-like syntax of Blaze and how nurses, doctors, and other clinicians could become familiar with it. However, the code wasn't very reusable and it was neither modular nor composeable nor testable, and became a major headache to maintain. React solves the problems of composeability and reusability and testing isolation, at the price of having worked the problem backwards and having wound up with a quirky syntax that runs within Javascript that looks similar to HTML but isn't. Nonetheless, React is quickly become a classic example of functional programming techniques, what with its' pure components. All in all, an enjoyable technology to work with that brings some sanity to front-end user interfaces.
We chose React on the advice of the Meteor Development Group, which acts as our upstream technical advisors. We had a prior investment in BlazeJS, due to it's optimistic UI, latency compensation, and real-time updates. However, the BlazeJS code wasn't composable and didn't lead to good reuse, as it was already overly abstracted. It also carried with it a lot of baggage from the default HTML DOM. We have enjoyed React's functional components, deterministic rendering, testability, composability, and widespread support. It's taken some time to get used to, but fits in very well with a functional programming style. We had also taken a look at AngularJS components, but they were always half-baked in comparison to the active React community.
Pros of Blazejs
Pros of React.js Boilerplate
- Amazing developer experience4
- Nice tooling4
- Easy setup3
- Easy offline first applications3
- Great documentation3
- Fast1