background preloader

React

Facebook Twitter

Redux best practices — Lexical Labs Engineering. Redux is the React framework that other flux frameworks recommend you use.

Redux best practices — Lexical Labs Engineering

It went 1.0.0 when I started writing this (and is at the time of publishing past 3.0.0!) And it’s still early days as to how to use it. Its author, Dan Abramov, has put together some great documentation, but it doesn’t yet fully address how to deal with engineering with Redux at scale — people are starting to ask, “are there any repos of non-trivial apps that use redux”. Testing in React: Getting Off The Ground — JavaScript Inside. A first look: the Low Level Approach Let’s start with a low level approach by using the React specific Test Utils.

Testing in React: Getting Off The Ground — JavaScript Inside

Test Utils enables a concept called shallow rendering, which simply means rendering a component one level deep, neglecting any child components. import TestUtils from 'react-addons-test-utils'; const renderer = TestUtils.createRenderer(); function shallow(Component, props) { renderer.render(<Component {...props} />); return renderer.getRenderOutput();} By implementing our own shallow function, we can simply call shallowRenderer internally and return a shallow rendered component. Enaqx/awesome-react. React.js Conf 2015 - Immutable Data and React. Christianalfoni WebApp Enthusiast. All standards, libraries, practices, architectures and patterns needs some time to evolve before becoming widely accepted.

christianalfoni WebApp Enthusiast

Flux inspired reactive data flow using React and Bacon.js - Reaktor. A few years ago I got introduced to reactive programming and Bacon.js, a FRP (functional reactive programming) library for Javascript.

Flux inspired reactive data flow using React and Bacon.js - Reaktor

I got fond of it very fast, as it allowed you to create highly reactive UI’s with ease. While it works great in propagating changes to your views, it was still rather cumbersome to attach all the data flows to individual DOM nodes and properties. React Native: Bringing modern web techniques to mobile. If you're new to React, you can read more about it on the React website.

React Native: Bringing modern web techniques to mobile

You can also get started with React Native for iOS, which was released at F8 2015 on the React Native website. It started with React We introduced React to the world two years ago, and since then it's seen impressive growth, both inside and outside of Facebook. Today, even though no one is forced to use it, new web projects at Facebook are commonly built using React in one form or another, and it's being broadly adopted across the industry. Engineers are choosing to use React every day because it enables them to spend more time focusing on their products and less time fighting with their framework. React forces us to break our applications down into discrete components, each representing a single view.

Together with the rapid iteration cycle of the web, we've been able to build some awesome products with React, including many components of Facebook.com. Why native is difficult Why native is necessary Using WebViews. Material UI - Material Design React Components. Creating A Simple Shopping Cart with React.js and Flux. Introduction Welcome to the fourth and final installment of the Learning React series!

Creating A Simple Shopping Cart with React.js and Flux

Up to this point, we've learned how React's API allows us to create rich stateful components, how to use them in practice & how Facebook's Flux architecture works. Today we are going to put all of it together to create a basic shopping cart application. In a typical e-commerce website, the product detail page has several moving parts that rely on one another and React really helps simplify and organize the co-dependency between them. If you haven't already, I highly recommend checking out the first three parts of this series: ReactJS 0.12 During the writing of this series, React released version 0.12 which made some fairly significant changes.

The /** @jsx React.DOM */ header is no longer required when writing JSX syntaxrenderComponent is now renderrenderComponentToString is now renderToString You can check out the entire changelog on the official blog post. Getting Started Directory Structure. Building robust web apps with React: Part 1, in-browser prototypes. Whenever I look into the internals of web browsers and the protocols that make the web work I usually end up feeling uneasy.

Building robust web apps with React: Part 1, in-browser prototypes

The number of parts that can and do go wrong makes it incredible that anything we build works at all. The against-all-odds robustness comes from the fault tolerance and backward compatibility engrained into key parts of web stack. The browser will always do its best to output something useful whether it’s parsing a badly authored document, unable to retrieve dependencies or 10 years out of date. I think this fundamental property of the web gets forgotten. Our aspirations as developers are becoming increasingly aligned with expectations set by other platforms.

I worry when I see sites that make JavaScript the lynchpin of getting at content now and for the future. The additional complexity of the code we’re delivering and extra work we’re shifting into the browser means users might not get anything when even a small problem occurs. Quick, in-browser prototypes. React.

ReactJS для глупых людей. Пытаясь разобраться с библиотекой от Facebook ReactJS и продвигаемой той же компанией архитектурой «Flux», наткнулся на просторах интернета на две занимательные статьи: «ReactJS For Stupid People» и «Flux For Stupid People».

ReactJS для глупых людей

Решил поделиться с хабравчанами переводом первой (а чуть позже и второй) статьи. Итак, поехали.TL;DR В течении долгого времени я пытался понять, что такое React и как он вписывается в структуру приложения. Это статья, которой мне в свое время не хватало. Enaqx/awesome-react.