Things move fast. It's web development! Here are some useful links and a summary of the so called React Ecosystem.
Note that to use React.js you don’t need to use all the ecosystem, which many times, it’s what makes difficult to begin. But if you want to build a real app, you should:
Babel is a JavaScript compiler that has support for the latest version of JavaScript through syntax transformers. It supports JSX with the React preset.
The best way to get started is this repo.
Note to Sublime users: Use it together with the babel-sublime package.
The babel-plugin-react-transform wraps React components with arbitrary transforms. In other words, it allows you to instrument React components. Examples:
render()
For a reference implementation, see react-transform-boilerplate.
Webpack is a module bundler. This means webpack takes modules with dependencies and emits static assets representing those modules.
The best way to get started is this great repo of Pete Hunt Webpack how to or this new repo.
ESlint is a pluggable linting utility for JavaScript and JSX.
You can use some common configurations out of the box with eslint-config-standard-react or eslint-config-airbnb or do your own configuration.
I like React-Router. It keeps your UI in sync with the URL. It has a simple API with powerful features like lazy code loading, dynamic route matching, and location transition handling built right in. Make the URL your first thought, not an after-thought.
The best way to get started is here.
There are many Flux implementations - an application architecture that Facebook uses for building client-side web applications -, but the one I like most is Redux.
Some people like to use immutable collections for JavaScript like immutable.js to maintain the state immutable, but is not a requirement (as long as you don’t mutate the state).
Redux is a predictable state container for JavaScript apps.
The best way to start is watching the Dan Abramov’s Redux course videos alongside the official documentation. You have the notes (and partial transcription) of the videos here.
Keep react-router and redux in sync - react-router-redux
I also suggest you to use this great and fun Redux DevTools browser extension. You development workflow will never be the same :)
In today’s world there are two dominant architectural styles for client-server interaction: REST and ad hoc endpoints, don’t forgetting Websockets.
But if you feel adventurous you can try GraphQL - a data query language and runtime -, together with Relay - a JS framework for building data-driven React applications, both from Facebook. This tutorial and this post should help you get started.
(aka Universal (before aka Isomorphic) apps)
Universal JavaScript means the same code runs in different environments, in this case, on the client and on the server (thank you node.js). This can help SEO and initial loading time of your SPA and can be easily achieved with React Router SSR.
There are some utilities (besides all major test runners and assertion libraries out there):
Here are some of the great examples, tutorials and starter kits:
If you are looking for some external components and libraries to use on your project:
Yes, It’s web development. Things move fast. You don’t need to master everything and there will always be that brand new technology that the cool kids will gonna want to use. Use what you need, and what makes sense to your project. If you want, start with the basics, and as your project grows, if you feel that something is start missing, opt-in for that tools. Refactoring is easy as long as you do it in a regular basis and structure your code well.
Meanwhile, follow some guys on twitter, they will keep you cover.
Happy coding.
15 Feb 2016 #reactjs #javascript #frontend
Someone once said "She's very enthusiastic and eager to test everything tech-related. Loves to get every front-end platform working automagically. She programmed her own Pebble and comes from the beautiful region of Alentejo."