Salvatore Laisa - Da Angular a React - Un viaggio inaspettato
-
Upload
codemotion -
Category
Technology
-
view
348 -
download
2
Transcript of Salvatore Laisa - Da Angular a React - Un viaggio inaspettato
ABOUT ME
• Frontend Engineer @ Contactlab
• Fat cat owner
• Kung-fu newbie
• Doctor Who fan
• @moebiusmania
• www.salvatorelaisa.me
MYSELF
• Experience in web fronted development
• Passionate about tech and web development
• User groups co-organizer and attendee (Appsterdam Milan,
MilanoJS, M&M Mean Milan)
• Angular JS 1.x heavy users since 2012
• Up to date in the JS world
CONTACTLAB
• since 1998
• New products R&D team
• Request to the team:
• Prototype and build a suite of products
• Shared look and feel, UI patterns and logic
• Build everything from scratch
No routing
No $http equivalent
No external templating system
No (easy) 2 way data binding
I’m not feeling very well too
FROM HTML TO JSX
https://facebook.github.io/react/html-jsx.html
Unfortunately JSX isn’t always “plain” HTML
PROPS & STATES & ONE WAY DATA FLOWS
• Data flows down
• Props are immutable
• States are mutable ( use .setState()! )
• Props & States can be passed to child
components as Props
REACT TEMPLATES
http://wix.github.io/react-templates/ (it comes with integrations for Webpack, Gulp and more)
BUILD YOUR OWN STACK
https://github.com/facebook/react/wiki/Complementary-Tools
• Fetch API polyfill • Flatiron Director • React Router • Lodash • …
… but now we have a full “official React” stack (React + Flux + Relay + GraphQL)
For tight workflows between developer (you) and UX/CSS designers
Polymer or React Templates are strongly suggested.