background preloader


Facebook Twitter

Elegant Functional Architecture for React. There are any number of ways to structure a React application, and dozens of libraries/frameworks hosted on GitHub to help you quickly bootstrap the next Instagram.

Elegant Functional Architecture for React

They are all pretty fun and interesting and will probably allow you build to something awesome in very little time. But I find the approach presented in this article to be particularly elegant. It’s simple and powerful and concise and also highly performant. This method is based on omniscient (which is inspired by Om) and the architecture of browser.html, which utilizes a technique conceived by the brilliant Gozala (who drew inspiration from the architecture of Elm). Note: I’ll assume that you are familiar with ES6, React, immutable-js, and generally how immutable data can be utilized for highly optimized rendering. I’ve embedded several interactive codepen demos in this article which do not work properly in browsers less than 700px wide. Laying the Groundwork The component function And here is our component function: Cursors?

The React.js Way: Getting Started Tutorial. Update: the second part is out!

The React.js Way: Getting Started Tutorial

Learn more about the React.js way in the second part of the series: Flux Architecture with Immutable.js. Now that the popularity of React.js is growing blazing fast and lots of interesting stuff are coming, my friends and colleagues started asking me more about how they can start with React and how they should think in the React way. (Google search trends for React in programming category, Initial public release: v0.3.0, May 29, 2013) However, React is not a framework; there are concepts, libraries and principles that turn it into a fast, compact and beautiful way to program your app on the client and server side as well.

Building modular javascript applications in ES6 with React, Webpack and Babel. Building modular javascript applications in ES6 with React, Webpack and Babel So, you have decided to build your new javascript application using React and you also want to use that new fancy ES6 syntax in it.

Building modular javascript applications in ES6 with React, Webpack and Babel

In addition you want to create reusable components and publish them to NPM. How exactly can you do this today? How do you publish ES6 to NPM and use it in your project later? It took me a while to nail all the bits and pieces, so I thought I’d share my knowledge here. If you don’t really want to read all the details and just want to see code — head straight to the last section. Requirements. How to use React & Om to make a Single Page Application (SPA) This React tutorial is a step-by-step guide on how to build a Single Page Application (SPA) with Om, a ClojureScript interface to React.

How to use React & Om to make a Single Page Application (SPA)

Overview In 2013 Facebook released React, a JavaScript library with a new vision for client-side HTML rendering. Unlike other client-side rendering engines, React maintains a “virtual DOM” that it compares to the browser’s HTML DOM. Instead of re-rendering the entire HTML DOM when the application models change, React calculates the differences between the virtual and HTML DOM and only updates the HTML DOM content that has changed.

Rendering only the differences makes React incredibly fast and efficient, allowing it to scale for handling large complex views that would perform poorly if rendered in other client-side frameworks like AngularJS or Ember.js. Index / SurviveJS - Webpack and React. React Webpack cookbook. Gitbook version In case you want to contribute, please create a PR against the main repo or contact us through the issue tracker.

React Webpack cookbook

The purpose of this cookbook is to guide you into the world of React and Webpack. Both are powerful technologies and when used together, frontend development becomes a joy. The cookbook should have something to offer for all skill levels. React Router Documentation. To illustrate the problems React Router is going to solve for you, let’s build a small application without it.

React Router Documentation

Without React Router As the hash portion of the URL changes, App will render a different <Child/> by branching on this.props.route. Pretty straightforward stuff. But it gets complicated fast. Imagine now that Inbox has some nested UI at a path like inbox/messages/:id and inbox/unread, etc. With React Router Nested URLs and nested component hierarchy are at the heart of React Router. Var Router = require('react-router');var Route = Router.Route; // declare our routes and their hierarchyvar routes = ( <Route handler={App}><Route path="about" handler={About}/><Route path="inbox" handler={Inbox}/></Route>); The React.js Way: Getting Started Tutorial. Tutorial. We'll be building a simple but realistic comments box that you can drop into a blog, a basic version of the realtime comments offered by Disqus, LiveFyre or Facebook comments.


We'll provide: A view of all of the commentsA form to submit a commentHooks for you to provide a custom backend It'll also have a few neat features: Optimistic commenting: comments appear in the list before they're saved on the server so it feels fast.Live updates: other users' comments are popped into the comment view in real time.Markdown formatting: users can use Markdown to format their text. Want to skip all this and just see the source? It's all on GitHub. Running a server # In order to start this tutorial, we're going to require a running server. For sake of simplicity, the server we will run uses a JSON file as a database. Getting started # For this tutorial, we're going to make it as easy as possible. <! For the remainder of this tutorial, we'll be writing our JavaScript code in this script tag. JSX Syntax # React-Router with Flux. React-Bootstrap.