Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction à ReactJS
Search
fdecampredon
September 23, 2015
0
59
Introduction à ReactJS
Presentation du talk d'introduction à ReactJS pour #MarseilleJS 4
fdecampredon
September 23, 2015
Tweet
Share
More Decks by fdecampredon
See All by fdecampredon
Introduction à GraphQL
fdecampredon
0
1.1k
Reactive Programming et React
fdecampredon
3
170
Going Reactive with React
fdecampredon
1
540
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
How STYLIGHT went responsive
nonsquared
100
5.8k
Fireside Chat
paigeccino
39
3.6k
Become a Pro
speakerdeck
PRO
29
5.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Balancing Empowerment & Direction
lara
3
620
The Language of Interfaces
destraynor
161
25k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Transcript
Introduction à ReactJS @fdecampredon MarseilleJS - 23/09/2015
React c’est … Une library de virtual dom Le «
V » de « MVC » Une library inspirée du Functional Programming Un framework horrible ou on mixe HTML et JS Des immutable data structures
React c’est … Un framework orienté « Components » Un
contrat pour définir des composants Composition au centre du développement
Les Composants Props: Composant input render: input => html «
monte » le composant sur la page
Le JSX • Optionnel • Syntactic sugar • Equivalent «
function call » : • Tout de même plus lisible • Le js c’est quand même plus puissant que des templates ….
Gestion des Events • « Behind the scene » •
Event delegation • SyntheticEvent
Composants « StateFull » État initial Mise à Jour Utilisation
de l’état
Composition App SearchBar CategoryProductRow ProductRow ProductTable ProductTable
Virtual DOM • On crée une « lightweight » représentation
de L’UI • Diff avec l’ancienne • Calcule le minimum d’opérations à appliquer au DOM On Rerender tout !
React vs … Est-ce que c’est vraiment Découplé ? Pas
tellement …. Est-ce que c’est Simple ? Qu’est ce qui arrive quand je click … ? Separation of concern
React vs …. • Simple et coherent ! • Fonctionnement
simple et compréhensible • Full power of Javascript Simple != Familier
Pourquoi React ? • Simplicité • Composition <3 • «
Momentum » • Productivité • etc …
Ce n’est que le début ! • MVC • Mutation
• CSS • REST => Flux => Immutability => Inline Styles => GraphQL
François de Campredon Fadio IT http://www.fadio.it @fdecampredon https://github.com/fdecampredon/ Questions ?