Pete Hunt: React: Rethinking best practices -- JSConf EU
JSConfYouTube ↗
Further reading 1
Caption notes
At JSConf EU 2013, Pete Hunt explains why React keeps display logic and markup generation together in a component. He uses alternating row colors as an example: if a template and controller agree on a color field, changing the display may still require edits in both places. He keeps display logic in the component and leaves work such as data fetching elsewhere in the application. On an update, the component describes the interface again from its data. In the early implementation he describes, React compares the previous and next virtual DOM descriptions and applies the resulting changes to the actual DOM.
Archived captions (transcription method unspecified) ↗Original passages · 2
templates separate technologies and not concerns.React rerenders the entire component.