Recoil: State Management for Today's React - Dave McCabe aka @mcc_abe at

  Рет қаралды 130,185

ReactEurope

ReactEurope

Күн бұрын

Пікірлер: 219
@sumanth3036
@sumanth3036 4 жыл бұрын
I wish everyone can present their ideas like him
@thalibmuhammad9519
@thalibmuhammad9519 2 жыл бұрын
its step by step, no missing step, and pressume audience dont know stuffs
@Waterwater743
@Waterwater743 2 жыл бұрын
one day, i will do the same hopefully
@Andy-si1pl
@Andy-si1pl 2 жыл бұрын
I can watch this again and again. He is actually explaining React very well as part of explaining Recoil.
@rickelmonoggin
@rickelmonoggin 4 жыл бұрын
"Do you see this as replacing Redux?" - "yes" (immediately).
@nitrovent
@nitrovent 3 жыл бұрын
I'm not sure. I really like the middleware approach in redux and extensions like sagas. Though they imho messed up the naming (especially for actions) and the overall presentation of the library. I think of redux more of a event sourcing library than simple state management.
@MaximilianoTechera
@MaximilianoTechera 4 жыл бұрын
This library looks incredibly awesome! I'm looking forward to trying it out.
@bartl9798
@bartl9798 2 жыл бұрын
"We're going to enter the third dimension" is the nicest way I heard someone describe global variables.
@jomaramomas7682
@jomaramomas7682 Жыл бұрын
The presenter is very good at presenting and explaining the subject matter.
@moatorres
@moatorres 4 жыл бұрын
Mate, that's amazing! Well done and thanks for sharing with the world.
@maddogshwa
@maddogshwa 4 жыл бұрын
+1 for any state MGMT tool that doesn't require me to make reducers. :)
@pumbo_nv
@pumbo_nv 4 жыл бұрын
Have you tried Mobx?
@islamabo0
@islamabo0 4 жыл бұрын
or even react-wisteria?
@sebastianmorris5394
@sebastianmorris5394 4 жыл бұрын
Or Apollo client?
@ytchess
@ytchess 4 жыл бұрын
+1 too!
@phyolim5064
@phyolim5064 4 жыл бұрын
or reduxjs/toolkit?
@bitzeche
@bitzeche 4 жыл бұрын
Is there any chance that you'll release the demo app from this presentation? As you said, Recoil is not very effective in a toy setting. Thanks for releasing Recoil this early!
@ruhulamin1741
@ruhulamin1741 4 жыл бұрын
absolutely. We need the demo app.
@anshnanda
@anshnanda 4 жыл бұрын
I would like this too!
@stonewu9736
@stonewu9736 4 жыл бұрын
I need it too
@michaelczolko6093
@michaelczolko6093 4 жыл бұрын
I'd like to see it too
@JacquesBlom
@JacquesBlom 4 жыл бұрын
Agreed - the benefits of Recoil aren't that obvious with a basic app. I'm working on a tutorial video where I build something similar to David's example app. I'll post here when the video and repo are ready. 🙌
@felixleupold7459
@felixleupold7459 4 жыл бұрын
Recoil looks amazing. With local state it covers almost all needs.
@dahnmaier4773
@dahnmaier4773 4 жыл бұрын
OMG. This is incredible! I absolutely love it (having dealt with precisely this kind of problems before). Thank you.
@xadasol8692
@xadasol8692 4 жыл бұрын
Wow I love this library already, I have fall into similar scenarios before where I just had to use whatever it was available within React's core library, and things weren't rendering or performing as smooth as I wanted to be, it was just super sluggish and we couldn't really do much... now this library could easily fix those problem we faced before and we could certainly go back to those projects and fix those quite easily! Thank God for bringing you guys on board to help solving quite complex uncovered scenarios from the React core team, not that they haven't been already, but this is literally the next level of state management where not everybody would come across every day! Anyways I just wanted to say a massive thank you to you and your team behind this great library.
@deejaydev
@deejaydev 3 жыл бұрын
I am building a React application and I have never use Redux because of my phobia of complex code or any other state management. But I was able to use Recoil, and I absolutely love it!
@BHFJohnny
@BHFJohnny 2 жыл бұрын
Yeah, nothing like writing 800 lines of Typescript before being able to actually use the store...
@brianfontenot9925
@brianfontenot9925 2 жыл бұрын
really great presentation. This looks like the way to go imo. I like the api a lot and loved the comment about state management ceremony, I've always felt this way with redux...
@wistemoor9671
@wistemoor9671 2 жыл бұрын
I agree, this is pretty wild stuff. Like, the amount of boilerplate and bloat you have to create with redux, especially in larger apps, seems like quite a lot compared to the simplicity required to hook recoil in
@antoniovelazquez9869
@antoniovelazquez9869 3 жыл бұрын
omg, I didn't know I could fall in love with a framework presentation. I've just been starting to learn redux for the last week or so on a side project that's actually similar to what was presented here (lots of divs, connected with SVGs, that can be dynamically moved and stuff), and things started to look messy. but now I can't wait to start using this!
@yashpandey9181
@yashpandey9181 4 ай бұрын
His presentation skills are exceptional🙌
@davidacosta6383
@davidacosta6383 4 жыл бұрын
*"..even change the background color....to lets see......white colourrrr....."* hahha Fantastic tutorial btw. I can't wait to see what this becomes. Thank you!
@sprintwithcarlos
@sprintwithcarlos 4 жыл бұрын
This is beyond awesome. It'll be as beneficial as hooks
@davidmalechek9443
@davidmalechek9443 4 жыл бұрын
Been using for a couple weeks. Crazy simple. Thank you Recoil.
@RyanMcKeel
@RyanMcKeel 4 жыл бұрын
Thanks for sharing! I grew used to the simplicity and flexibility of Angular's dependency-injected services with RxJS, but if you need to build in React this seems to help correct the frustrating quilt-work of redux/useContext/useState/localstorage/etc/etc that can quickly become a hairy mess of shared state management and creation of derivatives. Thanks for making React data management easier to work with and your awesome presentation & drawings to make it clear!
@markovujanic
@markovujanic 9 ай бұрын
I love this demo, I learned so much about though process and limitations of different React features. thanks
@lukeyd13
@lukeyd13 3 жыл бұрын
This guy is great at explaining, so much information protrayed in 30 minutes
@mellowgyatso10
@mellowgyatso10 Жыл бұрын
wow simply amazing how easily he explains it !!
@johnnybueti
@johnnybueti 2 жыл бұрын
The 3D idea to represent state is genius. Kudos!
@DiazGunturFebrian
@DiazGunturFebrian 3 жыл бұрын
You are the best teacher. Your presentation, your analogy, your explanation is synced with atom
@haejin7528
@haejin7528 4 жыл бұрын
16 minutes in and my mind is officially blown.
@chetanchaudhary1017
@chetanchaudhary1017 2 ай бұрын
I have never seen someone explaining something so good....
@podeig
@podeig 4 жыл бұрын
Good explanation and example! It looks amazing. We need something more simple and powerful then Redux. Keep working on this and I hope we will see a production ready release soon. Good luck!
@kreator1545
@kreator1545 3 жыл бұрын
I wonder why would you want to force constraint in the selector? this may result inconsistency between what's saved in the atom and what selected from the selector, may be hard to debug.
@phil-l
@phil-l 4 жыл бұрын
This was extremely impressive, this is much much more easy to reason vs redux, Recoil feels like JSX where Redux is HTML
@winstonnolan
@winstonnolan 3 жыл бұрын
I have learned so much of the basics, by watching this video! Recoil looks great, and you're a great teacher. Thanks for making this video
@JLarky
@JLarky 4 жыл бұрын
I like how whole tone of this presentation as if Redux didn't even exist
@gsofficial
@gsofficial 4 жыл бұрын
I like the tone implying creating more and more absurd libraries to "do anything" is "normal" in some way, as if the backend guys just immediately caved to every whim of their PMs instead of pushing back, calmly discussing tradeoffs, and coming to a mutual compromise. This library for example is ridiculous - you're supposed to be avoiding mutable state like the plague, bending over backwards to prefer constants, then cached values, then mutable state only as a last resort, not building more and more libraries to make it easier and easier to use it.
@user-sw1wq8lh2w
@user-sw1wq8lh2w 4 жыл бұрын
@@gsofficial I think we argue that mutable state is redux is bad because you can't identify the changes observably via mutation. This library doesn't have that issue, but I would like to see how it handles that situation of wanting to essentially subscribe to state changes. In fact at the very end, he suggests you can reduce over it and use the flux pattern.
@gsofficial
@gsofficial 4 жыл бұрын
@@user-sw1wq8lh2w I was a backend guy for the first 6 years of my career at Google... trust me, it has nothing to do with whether it's on a browser or not.
@pumbo_nv
@pumbo_nv 4 жыл бұрын
@@gsofficial correct me if I'm wrong, but Recoil state is immutable, same as React state. And this specific framework solves a problem that Redux fails at - rerendering only parts of the app that were affected by the change. As for mutable state, I thought the same until I checked Mobx.
@gsofficial
@gsofficial 4 жыл бұрын
@@pumbo_nv not to sound glib, but one good way to avoid that problem is to abandon frameworks that "do the re-rendering for you" and handle it yourself. Then, when things get too complex, you know your app is too big, and that you have pushed the language too far.
@barbaracassani6900
@barbaracassani6900 4 жыл бұрын
Great idea and excellent presentation. Thank you for that.
@shikharshrivastava6965
@shikharshrivastava6965 4 жыл бұрын
Does anyone know if this demo code has been open-sourced yet? It'll be great to be able to experiment over this app. Thanks
@DIEZ919191
@DIEZ919191 2 жыл бұрын
Hi! I'm curious to know what did you use for this demo, this drag n drop resizable components components are awesome!
@mithilesh6793
@mithilesh6793 9 ай бұрын
Lots to learn. Thankyou Dave!
@justinmitchell5660
@justinmitchell5660 4 жыл бұрын
Solved the same problem with rxjs, but this does look a bit nicer. One thing that could be of concern is exposing all of the atoms in a global scope.
@harishg9429
@harishg9429 Жыл бұрын
Terrific presentation, thank you
@spacelord.5
@spacelord.5 4 жыл бұрын
Dave, you are AWESOME! Thanks!
@Spectraevil
@Spectraevil Жыл бұрын
God I thought it was just me thinking that the current state management tools in react ecosystem are annoying as hell in some scenarios. This looks very elegant and natural, great presentation too. Kudos.
@arromeo121
@arromeo121 4 жыл бұрын
This is pretty cool. I have been using RxJS with React to solve these types of issues, but the API shown in the examples looked pretty good. Will definitely experiment with this.
@hovhadovah
@hovhadovah 4 жыл бұрын
Looks very promising! Definitely seems less complicated and easier to use than Redux.
@raphaelabadie2518
@raphaelabadie2518 2 жыл бұрын
Thank you, wizards 🧙‍♂ How many projects inside facebook use this technology currently? (May 2022)
@wepranaga
@wepranaga 4 жыл бұрын
here from Ben Awad 😆
@shuowang9328
@shuowang9328 4 жыл бұрын
+1
@BHFJohnny
@BHFJohnny 2 жыл бұрын
How lucky am I :D This is exaclty what I need. I stripped away all the props and all the throttling I disliked. Now everything is blazing fast and easy to maintain.
@asdf_600
@asdf_600 2 жыл бұрын
Incredible video, what did you use to make the drawings in the presentation ? It looks awesome and I would be happy to use it in the future :)
@thatryanp
@thatryanp 3 жыл бұрын
Hard to believe I'm prepared to learn yet another state management lib. But Recoil seems clear and minimalist without skipping important things like performance.
@DaniloJr
@DaniloJr 4 жыл бұрын
Can you provide the repo for this demo? Amazing presentation, awesome tool.
@Deevibedj
@Deevibedj 4 жыл бұрын
How about using atom values outside of react world ? For example in a helper function not tied to a component
@rhazelett
@rhazelett 4 жыл бұрын
Absolutely fantastic. Will be using it asap!
@samrad7244
@samrad7244 3 жыл бұрын
vue3 composition api for React, yay! nice to see the tools converging in concepts
@Biologymidterm
@Biologymidterm 4 жыл бұрын
Will the demo code be available?
@AngeloRandazzo
@AngeloRandazzo 2 жыл бұрын
great work! Is there a repo where we can find the source code of the example app you show in the demo?
@christalley5192
@christalley5192 4 жыл бұрын
This is so much better than redux!!!!!
@giuseppeleone2339
@giuseppeleone2339 4 жыл бұрын
Great presentation Dave. Thanks.
@yassineelbouchaibi9461
@yassineelbouchaibi9461 4 жыл бұрын
At 17:42, Dave McCabe suggests that no changes are required after changing his function itemWithID(id) so that it returns a selector instead of an atom, but unless I'm wrong setItemState can't be used on a selector... Did I miss something? Edit : After having a look at the docs, this is indeed true if the "set" property is also set in the selector which basically makes it act as a proxy.
@ebm_gamer
@ebm_gamer 4 жыл бұрын
Nice clean API for solving a hard problem 👏🏻👏🏻👏🏻
@modestslavnic84
@modestslavnic84 Жыл бұрын
He works for Pied Piper, right? 😁 Great explanation. Thank you
@troyjoachim1746
@troyjoachim1746 3 жыл бұрын
This is similar to Hookstate except it doesn't look like it handles nested state very well. But I do like that you can dynamically add state/atoms.
@NiloRiver
@NiloRiver 4 жыл бұрын
Very interesting concepts! Nice Work! Very inspiring as well.
@eder3232
@eder3232 Жыл бұрын
Could you share the repository of this project?
@alonsitto124
@alonsitto124 2 жыл бұрын
I really appreciate it, thanks a lot.
@none0n
@none0n Жыл бұрын
What is the status of this project?
@DevMagazineChannel
@DevMagazineChannel 4 жыл бұрын
Looks cool! Thank you 👍 Looking forward to work with it
@ubaidarshad
@ubaidarshad 2 жыл бұрын
why is still in an experimental ?
@hichem1027
@hichem1027 4 жыл бұрын
Great Explanation and it looks really interesting and powerfull
@Olleholleh
@Olleholleh 4 жыл бұрын
React comes with useAtom next year
@r34ct4
@r34ct4 4 жыл бұрын
link
@niklassoderberg2168
@niklassoderberg2168 2 жыл бұрын
It is very good i use it for everything, even small things.
@dariovieira399
@dariovieira399 3 жыл бұрын
Awesome video, really well presented
@Dron008
@Dron008 3 жыл бұрын
Not sure that moving components' logic (constraints) into selectors is a good idea or they shouldn't be names as 'selectors'.
@WoutMertens
@WoutMertens 4 жыл бұрын
It seems that a major feature is that it doesn't need the entire tree to re-render when a high-up context changes, but I thought the Context API uses subscriptions and already only updates subscribers?
@v1Broadcaster
@v1Broadcaster Жыл бұрын
driving me nuts that the debugger isn't showing width or height -.-
@yannid5456
@yannid5456 2 жыл бұрын
I looked at the dom tree of my react code , and noticed that Recoil uses Context Providers as the underlying code.
@B45i
@B45i 2 жыл бұрын
Code for this demo app available somewhere?
@pzduke
@pzduke 4 жыл бұрын
Wow! I’ll definitely give it a try my very next project with state management. Can somebody please tell what’s the tool/stencils Dave uses for presenting the hand-made-styled schemes?
@BehindCid
@BehindCid 4 жыл бұрын
Maybe excalidraw
@slavabereza1922
@slavabereza1922 3 жыл бұрын
React already had beautiful hooks for state controlling, necessary only sharing mechanism. #ReactEurope can you make API the same as the "use-between" hook? To reuse exists React hooks for state control, and don't produce new hooks. What do you think?
@jweboy
@jweboy 4 жыл бұрын
Can you give a simple example, because you can only see some analysis from the video, but you can't see a coherent process, and some steps are still incomprehensible. If there is a complete demo, it will be easier to understand.
@magne6049
@magne6049 4 жыл бұрын
The Atom's described in this video seems like a ViewModel from the MVVM pattern (alternative pattern to MVC). Are Atom's in effect a ViewModel?
@MatiasGRodriguez
@MatiasGRodriguez 4 жыл бұрын
Yes, but I would say that any state (react state, redux, mobx, etc, etc) is the ViewModel. The points of this library is just to render only what changed using an API very similar to current React.
@justinmitchell5660
@justinmitchell5660 4 жыл бұрын
Performant, really enjoying the use of that word, it just doesn't quite get used enough...
@kreator1545
@kreator1545 3 жыл бұрын
Is there a Repository for this?
@ahmedhamed8324
@ahmedhamed8324 4 жыл бұрын
I'm just speechless!
@magne6049
@magne6049 4 жыл бұрын
How does this compare and contrast with two-way data binding?
@tptm
@tptm 2 жыл бұрын
Selector is a PURE function that can be async in case it needs to calculate based on DATA FROM SERVER. It's either selector semantically imposes restriction on server data prohibiting it to ever change or selector shouldn't be recklessly called a pure thing.
@devarsh099
@devarsh099 4 жыл бұрын
I feel this can help me write performant forms in React since the Context API has limitations - you cant subscribe to a piece of data and adding context dynamically is not something you can achieve per field, hence rendering all fields on every keystroke was looking at using Proxy but got complicated with nested form values. It feels like subscribing to a slice to data in context, something React is not providing natively, those kinds of use cases where performance is laggy, this library can help.
@TheHakaseOne
@TheHakaseOne 4 жыл бұрын
I'd look at React Final Form, I quite enjoy using it. It uses render props and handles your state and subscriptions for you.
@pulga961
@pulga961 4 жыл бұрын
implement debounce. You dont need state managment library for forms.
@ferooref7614
@ferooref7614 2 жыл бұрын
Where can I get the source code for your app please ?
@DzintarsDev
@DzintarsDev 4 жыл бұрын
React only?
@Timur21
@Timur21 4 жыл бұрын
I still dont get how to do async updates.. cant find any example that works..
@odessaRoads
@odessaRoads 3 жыл бұрын
What about devtools?
@-rXr-
@-rXr- 4 жыл бұрын
interesting 😯 , looking forward to it
@santiagocalvo
@santiagocalvo Жыл бұрын
this man is a god
@ahnoltyhoder
@ahnoltyhoder 4 жыл бұрын
Dave McCabe casually makes a Sketch clone, just as a demo...
@GaLzZy.
@GaLzZy. 4 жыл бұрын
Is this a Redux replacement ? :D
@MatthewM770
@MatthewM770 4 жыл бұрын
When he said Async @18:15 ! :D
@romanvasyliev8267
@romanvasyliev8267 4 жыл бұрын
Jim Morrison of React
@tooondi
@tooondi 3 жыл бұрын
haha
@ahmadalibaloch
@ahmadalibaloch 4 жыл бұрын
Is it not the same if we put a subscribe-able (rxjs Subject) in a Contenxt Provider or directly push that subscription to useState?
@0x6e95
@0x6e95 4 жыл бұрын
I feel like Recoil is much more flexible though especially for interdependent state. Sure, you can achieve shared state with rxjs subjects but it isn't quite that flexible.
@aromal_anil
@aromal_anil 3 жыл бұрын
Have anybody tried react-rhino? It is a very light state management made taking inspiration from Recoil
@nguyenmanhcuong6092
@nguyenmanhcuong6092 4 жыл бұрын
easy to use, but the problem here is how to structure the file & state according to the business app? This is my concern. Personally, I think that redux is doing very well :3 so I hopefully will have some example or pattern about that soon :) so excited
@JuanBonfante
@JuanBonfante 4 жыл бұрын
cool implementation, its a unique twist on redux + effects + selectors, probably solves for a ton of the headaches. As you need to implement a single source of truth you'd likely end up back at some form of redux state.
@rickelmonoggin
@rickelmonoggin 4 жыл бұрын
A question about the demo at 11:36: The highlighted areas in your slide (those with a yellow outline) indicate the components that are being re-rendered by React, not DOM updates, (although in this case they will be the same). My understanding is that the entire tree of components can re-render, but only those parts of the DOM that have actually changed will be changed in the DOM. So the optimisation here is reducing the number of render() methods that have to be called. The number of required DOM updates would have been exactly the same had you used Redux instead, even if every component had to be re-rendered every time. Have I understood this correctly?
@nikitaosadchuk1467
@nikitaosadchuk1467 4 жыл бұрын
#ReactEurope Can you give this project ,for testing and learning ?
Каха и лужа  #непосредственнокаха
00:15
Try Not To Laugh 😅 the Best of BoxtoxTv 👌
00:18
boxtoxtv
Рет қаралды 7 МЛН
这是自救的好办法 #路飞#海贼王
00:43
路飞与唐舞桐
Рет қаралды 112 МЛН
Picking From 20 React State Managers
35:18
Jack Herrington
Рет қаралды 85 М.
Why use Recoil in React? | Atoms and Selectors
13:09
CBT Nuggets
Рет қаралды 4,4 М.
Understanding React's UI Rendering Process
29:07
CrossComm, Inc.
Рет қаралды 218 М.
Introduction to React Recoil (Experimental) State Management
27:50
Leigh Halliday
Рет қаралды 11 М.
Goodbye, useEffect - David Khourshid
29:59
BeJS
Рет қаралды 502 М.
Data Fetching with React Server Components
57:20
Meta Open Source
Рет қаралды 263 М.
React Query: It’s Time to Break up with your "Global State”! -Tanner Linsley
29:01
React Conferences by GitNation
Рет қаралды 139 М.
Обзор RecoilJS. Пишем приложение c ReactJS и Recoil
38:51
Веб-разработка - DevMagazine
Рет қаралды 5 М.
React Wednesdays: Learning Recoil w/ David McCabe
52:18
Kendo UI
Рет қаралды 1,7 М.