際際滷

際際滷Share a Scribd company logo
Alexandre Gomes
EMBRACE THE 束REACT FATIGUE損
PROFESSIONAL JS CONFERENCE
8-9 NOVEMBER19 KYIV, UKRAINE
JS Fest 2019/Autumn. Alexandre Gomes. Embrace the "react fatigue"
JS Fest 2019/Autumn. Alexandre Gomes. Embrace the "react fatigue"
#1 cause of developers shortage
JS Fatigue
! Yearly ES spec
! New libraries, features
! New good practices
! Imposter syndrome
! TS is now the industry standard
! Node is now required for front/back-end
! Tooling complexity (webpack, babel) = Entry barrier
JS Fatigue
React Fatigue ?
React Fatigue
More influential voices ?
A new paradigm !
! New paradigm: UI as a function of state
! All previously done by a framework ! (switch to micro)
! Fast iterations, new problems to solve
! npm ecosystem
React Fatigue
React 束Frameworks損
Full-stack 束Frameworks損
Vulcan is unique in that it spans the full stack, from the database to the browser.
While there exists many excellent back-end frameworks or backend-as-a-service
providers, these all still require you to handle your front-end code yourself,
including building a set of components to read, write, and display data.
But because Vulcan is full-stack, its able to speed up these repetitive tasks by
providing a whole range of helper components that are 鍖ne-tuned to the Vulcan back-
end, and as a result just work out of the box.
Full-stack 束Frameworks損
Yo 
! From  , living in 
! Full-Stack, focusing on front-end
logic
! Just talk to me later on!
! @alexgomesdev
My experience with webdev
! Full-Stack dev
! Worked on the back-end, Node.js
! Entered front-end dev professionally
! Straight up took on a complex project
! I dont have that much experience !
束Complex project損
! Complex apps NEED patterns
! React isnt the simple thing people usually think of
cryptodoggos
At first, I was like 
! Im lazy
! No DSL to learn
! No opinionation
! React it is!
! (incidentally, unidirectional
data flow and functional
style)
Im lazy: no opinionation/DSL
! React is a library, not a framework
! 束React is just JS損
! No concepts to learn on top of JS/HTML, just a 束simple損 API
JS Fest 2019/Autumn. Alexandre Gomes. Embrace the "react fatigue"
Add a bit of state management
Async / Side-effects in redux
redux-saga to the rescue
Just moving the problem away
! Boilerplate
! Abstracting REST API / network (Ethereum, etc..) calls to redux
! There must be a better alternative ?
Redux ecosystem is huge
! flux pattern
! redux, react-redux API
! redux-saga
! redux-thunk
! reselect
! redux-promise
! redux-form/react-redux-form
! redux-watch
Some HOC extract
How to compose components ?
Composition looks coo.. oh wait
Better ? Meh
compose() to the rescue
Yo man, REST is dead
GraphQL
! Declarative data-fetching
! Query Language + Schema Definition Language (SDL)
! Ask only for what you need
! Doesnt define how you get data
! Doesnt have to be a server
! Just a spec
Doesnt define how
Doesnt define how
GraphQL: Just about data fetching ?
Well not only !
! Query-Component colocation
! Reduces redux usage
! Complete ecosystem with optimistic UI updates, caching etc (apollo-
client)
! New pattern to learn
! New concepts to learn if you use relay
! Defines your app architecture
Who uses CSS in 2017 !?
webpack Sass/LESS loader ?
JSS ?
React 16.3: Context API
React 16.8: Hooks
! New way to interact with React
! Functional
! Easy to test
! Easier to do composition, out-of-the-box
Hooks are great ? Going from this
To that !
But
! New syntax to learn
! New composition model to learn
! New reasons for debates to emerge in the community
! Entry-barrier to react becoming even higher
Now I looked like this
The bad news: Theres no solution!
Can be mitigated!
! Dont try to recreate a framework
! Dont be afraid to try non-standard libs
! Would a new React dev learn easily?
! Avoid lock-in
束Would a new React dev learn easily?損 
! Try to minimise the 束onion effect損
! Gatsby: Need to learn React + GraphQL
Avoid lock-in
! How hard is it to opt out of chosen solution?
! react has small lock-in footprint
! rails-like solution = bigger lock-in
Every pattern can be dirty
! Try to think your pattern at scale in advance
! Regularly reconsider your choices
Dont go full hipster.
Seriously, dont go full hipster
! Keep it clean
 One lib/technology per pattern
 Isolated parts of your app
 Refactor if/after you ditch that pattern/library
 No conflicting patterns 
! Side projects are cool !
Embrace it
! Dont forget why you chose a library vs. a framework 
! Skeptical mindset
! React Fatigue is a strength
! Embrace the ecosystem
Stay curious!
! Stay curious
 Read about new libs / patterns
 Analytic mind on trends
 Dont always go with the community
JS Fest 2019/Autumn. Alexandre Gomes. Embrace the "react fatigue"

More Related Content

JS Fest 2019/Autumn. Alexandre Gomes. Embrace the "react fatigue"