Upgrade to Pro — share decks privately, control downloads, hide ads and more …

React Colocation

React Colocation

React changed the way we developed apps.
We used to split out logic in differents parts, but now we colocated them.
What we colocate?
- view
- state
- event handlers
- style
- route
- effects
- data

Sibelius Seraphini

September 12, 2019
Tweet

More Decks by Sibelius Seraphini

Other Decks in Research

Transcript

  1. State Colocation const Post = () => { const [isLoading,

    setIsLoading] = useState(false); /* render post, etc */ }
  2. Route/Navigation Colocation Define navigation configuration class HomeScreen extends React.Component {

    static navigationOptions = { title: 'Home', }; /* render function, etc */ }