navigating the react ecosystem

12
A TOOLBOX FOR DEVELOPERS WHO DON’T HAVE TIME TO SPEND WEEKS FINDING THE RIGHT PACKAGE NAVIGATING THE REACT ECOSYSTEM FEDERICO BOND LEAD DEVELOPER @ BITCOURT @FEDERICOBOND

Upload: federico-bond

Post on 15-Jan-2017

310 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Navigating the React Ecosystem

A TOOLBOX FOR DEVELOPERS WHO DON’T HAVE TIME TO SPEND WEEKS FINDING THE RIGHT PACKAGE

NAVIGATING THE REACT ECOSYSTEM

FEDERICO BONDLEAD DEVELOPER @ BITCOURT @FEDERICOBOND

Page 2: Navigating the React Ecosystem

RATING SYSTEM

Mind blowingYou will want more of it

ExcellentUse it without doubts

Good for nowBut better solutions will come up soon

Page 3: Navigating the React Ecosystem

ARCHITECTURE & STATE CONTAINER

REDUX

Reducers

Single state atom

Action creators

Several async approaches

Awesome DevTools

react-redux bindings

Page 4: Navigating the React Ecosystem

ROUTING

REACT-ROUTER

Multiple backends

Nested routes

Callbacks

Redux syncing with react-router-redux

Page 5: Navigating the React Ecosystem

INTERNATIONALIZATION

REACT-INTL

Keyed messages, manual extraction

Next version adds tooling for extracting strings

Alternative: gettext approaches

Page 6: Navigating the React Ecosystem

SELECTORS

RESELECT

Selectors a la Nuclear.js

Page 7: Navigating the React Ecosystem

BUNDLING

WEBPACK

Batteries included

ES6 transpiling (and flow!)

Hot Reloading

Page 8: Navigating the React Ecosystem

COMPONENT STYLING

CLASSNAMES

Dynamic component styling helper

Page 9: Navigating the React Ecosystem

TESTING

IT’S COMPLICATED

Jest vs Karma + Jasmine

ReactTestUtils vs enzyme

Page 10: Navigating the React Ecosystem

ONE MORE THING…

BEST PRACTICES▸ Use Flux Standard Action (FSA)

▸ Avoid side-effects in reducers

▸ Split presentational and container components

▸ Use Immutable.js to enforce immutability

Page 11: Navigating the React Ecosystem

THANKSFEDERICO BOND LEAD DEVELOPER @ BITCOURT @FEDERICOBOND

Page 12: Navigating the React Ecosystem

CASE STUDY

BUILDING A COMPLEX INTERACTION

▸ User starts an action that requires authorization

▸ App opens password-required modal

▸ User types password

▸ User presses enter or clicks Accept

▸ App closes modal or shows password error

▸ User can close the modal to abort action

▸ Application continues with action on success