Angular ngrx Redux Quick Start Tutorial

Поделиться
HTML-код
  • Опубликовано: 28 авг 2017
  • Learn the basic concepts and design patterns behind Redux and NgRx store. I will show you how to build a basic Redux app with Angular4 from scratch.
    Full Lesson: angularfirebas...
    Demo App: github.com/cod...
    NgRx: github.com/ngrx
  • НаукаНаука

Комментарии • 218

  • @Andrew-tl9gk
    @Andrew-tl9gk 3 года назад +32

    NgRx: How to make simple things complicated

    • @ihateidiots9484
      @ihateidiots9484 3 месяца назад

      That's not just Ngrx, that's Redux and React b*llsh*t way

    • @mfpears
      @mfpears 2 месяца назад

      And complicated things less complicated

  • @dr_rick
    @dr_rick 6 лет назад +168

    I don't know if I'm just stupid, but I didn't understand anything with you explaining this way.

    • @patrickjones3826
      @patrickjones3826 6 лет назад +4

      I highly doubt you're stupid my friend. Do you have experience with reactive programming?

    • @chrisdash83
      @chrisdash83 4 года назад +5

      I find that surprising. The first 80 seconds made the concept so clear, everything suddenly started to make sense. Especially after watching a different video earlier that lacked the whole conceptual explanation.

    • @FidelGuajardo
      @FidelGuajardo 4 года назад +16

      You are not stupid. Everything takes time and prior knowledge to learn. Any prior experience working with Redux, MobX, or Vuex helps to understand ngrx. However, you can skip those and just learn all about ngrx from different sources. Time. Don't give up.

    • @amoghskulkarni
      @amoghskulkarni 4 года назад

      No, you're definitely not alone who had the same experience - I had to loop through the first few minutes a couple of times too. But once the core concepts clicked, the rest of the video was no problem.

    • @ssonarikar
      @ssonarikar 4 года назад +2

      set playback speed to 0.75 and watch..... intermittently go back and forth to relate current code that he is writing

  • @rahultalar
    @rahultalar 5 лет назад +68

    Great tutorial. But its for super-humans with the lightning speed.

    • @ssonarikar
      @ssonarikar 4 года назад +2

      set playback speed to 0.75 and watch..... intermittently go back and forth to relate current code that he is writing

    • @rifatahsan5636
      @rifatahsan5636 3 года назад +1

      😂😂😂😂 so fuking true

  • @zoecarlibur
    @zoecarlibur 6 лет назад +9

    Your tutorials are awesome, It's perfect for when you want to understand the basic aspect of a concept really fast. Keep it up and thanks.

    • @Fireship
      @Fireship  6 лет назад +1

      Thank you, much appreciated!

  • @srjbora
    @srjbora 7 лет назад +144

    I am brand new to ngrx Redux, and your tutorial is so fast that I got nothing. :(

    • @Fireship
      @Fireship  7 лет назад +25

      Sorry to hear that. Most of my content is geared towards intermediate-advanced developers, but I will be releasing a beginner tutorial that you can follow step-by-step in a few days.

    • @christarasovs4081
      @christarasovs4081 7 лет назад +14

      just slow down a little , so we can digest what u say :)

    • @HelmutGranda
      @HelmutGranda 6 лет назад +8

      Chris Tarasovs you can change the playback speed in RUclips under the video options.

    • @micahgoodreau
      @micahgoodreau 6 лет назад +5

      Ichange the playback speed all the time. Who wouldn't want to so that.

    • @NurseDaveBSMSON
      @NurseDaveBSMSON 6 лет назад +6

      it takes watching many of these videos to understand redux. Try watching the egghead.io Dan Abramov redux video course, it's free. That will teach the redux pattern. Then come back to this one when you need to make it work with ngrx/store.

  • @showmeyourcode
    @showmeyourcode 3 года назад +26

    Great tutorial for all who know the Redux concept, it works for me! Unfortunately, for newcomers it might be a bit difficult because of the speed.

    • @minerwilly
      @minerwilly 2 года назад +6

      Completely impossible to follow for a newcomer like me.

    • @maguilecutty
      @maguilecutty Год назад

      if ur a new comer and cant follow then you havent mastered the base concepts yet. You should return to those.

  • @superaavish
    @superaavish 5 лет назад +3

    People complaining about too fast explaination. Please go through docs of ngrx first (basics). Then watch this, you'll then understand value of this video.

  • @rzaagman
    @rzaagman 4 года назад +4

    Great speed! Listen, Pause, Read, Back-forth super easy. Me like!

  • @shahenshahmalik
    @shahenshahmalik 2 года назад

    I think you have affected so many companies by now from your tuts, love your work!!! 🔥🔥🔥

  • @athirajyothishkumar6933
    @athirajyothishkumar6933 4 года назад

    Guys just slow down the video and follow along with him. Yes the video is a bit fast. But if you just slow down the video and follow his steps its pretty easy to understand. I have gone through many videos and this was the one which actually helped me understand the logic. Thanks a lot!!!!

  • @maxwellmandela
    @maxwellmandela 2 года назад +2

    9 minutes of exactly what I needed, thank you!!

  • @MetsuryuVids
    @MetsuryuVids 5 лет назад +2

    OK, I didn't understand anything the first time I watched this a few hours ago, but then I watched another video that explained it better, and this was a useful quick summary.
    I'll probably come back to re-watch this, as a refresher, but it's not very good to learn the concept initially.

    • @Feitan710
      @Feitan710 5 лет назад

      what other video did you watch

  • @ondrejmachala5409
    @ondrejmachala5409 5 лет назад +3

    Thanks for the video - quick and easy explanation!! This saved my time reading tutorial

  • @camilotabares3778
    @camilotabares3778 6 лет назад +4

    Don´t forget to include the FormsModule into the appModule so the tutorial works propertly

  • @ghostrAider98
    @ghostrAider98 Год назад

    Anyone watching this tutorial in 2023. Some syntax has changed for ngrx, like there is a dedicated method called createAction() to create actions and something called for payload of an action. For the concept though, this tutorial is still one of the best

  • @alejandrorossi868
    @alejandrorossi868 4 года назад

    great tutorial for someone who already knows something about redux and wants to use it in angular. If you want to understand from 0, search for a largest tutorial where explains what is an action, reducer, effect, etc.

  • @null8036
    @null8036 Год назад

    great video, i need to make some observable value that will be subscribed by multiple child component at different time so i thought that ngrx maybe a best solution instead of using static observable for it and after watching this video it clear to me that ngrx is the best solution that i can use.

  • @zebcode
    @zebcode 3 года назад +1

    If anyone gets an issue in their app config after following the second example try removing the readonly keyword from the type parameter of your actions. I assume that something changed since the video was made.

  • @vladnicu3655
    @vladnicu3655 6 лет назад +30

    too fast :(, missing a lot of details

    • @ssonarikar
      @ssonarikar 4 года назад

      set playback speed to 0.75 and watch..... intermittently go back and forth to relate current code that he is writing

    • @problemchild959
      @problemchild959 3 года назад +1

      @@ssonarikar shouldn't have to, this guy needs to learn to slow down. if you were to try what he does, he switches from file to file so fast its impossible to keep up without pausing.

  • @sanathkumaru6358
    @sanathkumaru6358 6 лет назад +22

    Please slow down the pace with which you explain.Give some time for viewer to see the changes that was made.

    • @Fireship
      @Fireship  6 лет назад +3

      Thanks for the feedback. I'm working on that ;)

    • @sun_raise_ap
      @sun_raise_ap 6 лет назад +1

      Bro reduce the play speed, this may help..

    • @johnfrades
      @johnfrades 6 лет назад +5

      or pause the video

    • @WillVanPelt
      @WillVanPelt 4 года назад

      @Ales Kosi Oof ^ this guy has entered the chat.

  • @babchenkonikolay911
    @babchenkonikolay911 6 лет назад +4

    Men, your lessons are one the best on the internet. Thank you so much! Good structure, concise and clean. Thinking about to buy your book. What are the benefits of doing so? Do you have a paper version?

    • @Fireship
      @Fireship  6 лет назад

      Thank you! You're better off buying a pro membership and getting the book for free angularfirebase.com/pro/

  • @valentinemayaki7126
    @valentinemayaki7126 6 лет назад

    Nice quick and understandable of course when you do a rewind. Well done

  • @ongeri
    @ongeri 6 лет назад

    Very good tutorial, the narration and video are in sync and clear.

  • @sadipichannel3746
    @sadipichannel3746 5 лет назад +1

    Life-saver ! God bless you for all of these awesome tutorials......

  • @calvinzhu7438
    @calvinzhu7438 2 года назад +1

    it is useful for event sourcing or command bus ... Thanks for sharing!

  • @raphaelprinz304
    @raphaelprinz304 3 года назад +2

    In app.module.ts "post" not assignable to ActionReducer and "simpleReducer" is unknown

  • @omprakashsahkanu2419
    @omprakashsahkanu2419 2 года назад

    Crystal clear explanation! Thank you!

  • @mfpears
    @mfpears 2 месяца назад

    It's important to realize that actions are events, not "ways to change state" or things that are "trying to change state." They represent what happened only. Reducers own the responsibility to decide how its state should change.

  • @Orbicalaz
    @Orbicalaz 7 лет назад +5

    Finally what I have been waiting for....can we get an example for CRUD items on firebase with NGRX?

    • @Fireship
      @Fireship  7 лет назад +4

      Funny you should ask. That's the exact topic of my video tomorrow. It will cover retrieving and updating Firebase data with ngrx/effects.

    • @AaronSaundersCI
      @AaronSaundersCI 7 лет назад

      github.com/aaronksaunders/ionic3-ngrx4-angularfire

  • @Tomasilix
    @Tomasilix 4 года назад

    I just wanted to say that I liked your video, I'm experienced with React+Redux and I have to maintain Angular application now. I head abour ngrx and this video is perfect for me to know how it works. In 9 minutes! It's great, thanks for the vid, it's just not for beginners.

  • @karthikeyaneie
    @karthikeyaneie 3 года назад

    Really good content....thumps up ....but it's at God speed....I will keep revisiting the video....for more clarity everytime. Thanks.

  • @crystalomara3664
    @crystalomara3664 5 лет назад +2

    I found this tutorial very insightful and I really got a lot of information from it. Some complain that it was "too fast" but I disagree. I did end up pausing it and would jot down notes then replay it again. It's fast because it's very high level.

  • @raghavendramj123
    @raghavendramj123 3 года назад

    Exactly to the point.. Got what needed! .. Thanks, Fireship!

  • @anuragtiwari6659
    @anuragtiwari6659 3 года назад

    Thanks for tutorial. Made perfect sense to me at first watch only. I tried different others but your explanation was top notch.

  • @bommijn
    @bommijn 3 года назад

    Thanks for the fast tutorial

  • @melpacheco9288
    @melpacheco9288 7 лет назад +4

    Thank god for this channel

  • @ArminZia
    @ArminZia 4 года назад +1

    I've always enjoyed your videos and have found them very helpful. I've studied state management techniques and libraries for months. NgRx, Ngxs, Akita, to name a few. And to be honest, this is by far the best introduction I've seen or read on NgRx, cheers. Maybe it's just me, but I like your style, my kinda tutorials. Fabulous 🐉🎠

  • @paolopantaleo7330
    @paolopantaleo7330 2 года назад +2

    This was done in 2017, so it is a bit outdated now. First part is ok, but the second part will not compile and it seems that the recommended way of doing things has changed in the meanwhile.

  • @nimoantony3158
    @nimoantony3158 3 года назад

    quick note: Observable is now exported from rxjs instead of rxjs/Observable

  • @maximhebert-gareau4461
    @maximhebert-gareau4461 6 лет назад

    Well explained thanks! I didn't feel it was too fast.

  • @robertojarzembowski
    @robertojarzembowski 6 лет назад +1

    One thing that I dont get is, if the porpouse is to have a single object for all the state in the app, why all examples out there always add multiple reducers to the store, I mean, every reducer has it's own payload, and the state managed in this reducers is strong typed. I just dont get how all of this can be a SINGLE object.
    In the project you build on this video, you have the postReducer and the messageReducer - how handling the postReducer and retuning a state of type POST does not overwrite that MESSAGE part of the store object?

  • @sg0101010
    @sg0101010 4 года назад

    Great tutorial, quick and too the point. Not every tutorial has to be a 5 hour video. Question though as I think ngrx changed (which is seems to often do which is unfortunate) - the setting of 'return newState(state, { text: action.payload })' . the action.payload has been removed from Action

  • @Min3vidz
    @Min3vidz 3 года назад

    Perfect refresher, thanks!

  • @PadillaJosh
    @PadillaJosh 6 лет назад +1

    Yo your tutorials are legit super good love the pace.

  • @jeanmuyuela8112
    @jeanmuyuela8112 4 года назад

    The tutorial is very good for people who allready know rxjs, master in angular and ts. This is the right tutorial for me. Fast and informative

  • @muzuriaimable9581
    @muzuriaimable9581 5 лет назад +2

    this a wonderful tutorial even if is very fast but is helpful

  • @Billy011nb
    @Billy011nb 4 года назад

    this has been a gift. thank you

  • @pauldanielmooney
    @pauldanielmooney 6 лет назад

    I wasn't really sure what Redux would accomplish in Angular that couldn't be done with Injectables/Services and ReplaySubjects with seemingly the same amount of effort, but I guess there's that nifty debugging tool that makes it all worth it? As the video says that tool is the most important feature of Redux.

  • @manudev5693
    @manudev5693 4 года назад

    Perfect for me! congratulations. I've developed js until 5 year ago. Now deeping into the new frontend approach de on a new job. It's time to study in detail the framework docs in deep and apply it to my job.This kind of material it's the thing that I am looking for, everytime I need to update my experience. Thank you!

  • @eriucho
    @eriucho 5 лет назад

    Great! i understood it perfectly, you are very good explaining it.

  • @pandarzzz
    @pandarzzz 6 лет назад +1

    Thank you for sharing this informative video! 🐔🖐🏻

  • @TheMadSmiler
    @TheMadSmiler Год назад +2

    Great tutorial but could you go a bit faster next time?

  • @HarikrishnanKK
    @HarikrishnanKK 7 лет назад

    Thanks a lot!. There is ng2-redux too, which performs more or less the same thing as mentioned in the video. The video was quite helpful though. And it would be damn quite helpful as you can just introduce one concept at a time just as you have shown here coz ngrx as a whole, and the usual conf talks about that in youtube , most times just goes over the head and doesnt help. This video was about the intro, and as you told, the next will be for the side effects, then about animations etc, and if there is a bit more realistic examples, that wud do no harm either.! One question - If you keep adding the individual reducers inside the import section, eventually the app.module gets bloated. Do we have a combineReducers kind of thing, where we just import that thing in app.module and the rest of the additions happen in that reducer file? Am sure we can do that. I love this channel!..you rock.

    • @Fireship
      @Fireship  7 лет назад +2

      +Harikrishnan Thank you for the feedback! It is possible to combine reducers, but there's a pull request in ngrx currently for a utility method that will handle this exact problem, so maybe we will see that in the future.

  • @ib6435
    @ib6435 3 года назад +2

    If you're watching in 2021, make sure you import your "FormsModule" to have access to [(ngModel)]
    .
    Meanwhile, i'm battling with the console error
    .............................
    Types of parameters 'action' and 'action' are incompatible.
    Type 'Action' is not assignable to type 'All'.
    Type 'Action' is not assignable to type 'Reset'.
    Types of property 'type' are incompatible.
    Type 'string' is not assignable to type '"[Post] Reset"'.
    25 post: postReducer

  • @8b48suhanijayaswal4
    @8b48suhanijayaswal4 5 лет назад

    @Angular Firebase - Content and Videos are too good ! Thanks for all you efforts !! Appreciate !!! But i have observed its pretty fast so every-time i have to stop and rewind 2-3 times to understand and code. Also can you please come with complete series of videos on particular topic from start to end / Beginners to Advanced level - TESTING with JASMIN KARMA, RXJS, NGRX, OBSERVABLES etc
    Please keep developing the great content at less speed / slow pace. Thanks

  • @FidelGuajardo
    @FidelGuajardo 4 года назад

    Never a dull video from Jeff. Always top notch

  • @MoMoadeli
    @MoMoadeli 6 лет назад +1

    Thanks for the helpful video. I'm curious, what software did you use to record/cast it?

  • @jonatangall3715
    @jonatangall3715 4 года назад

    Awesome video! thanks a lot for share it!

  • @codewithyug1129
    @codewithyug1129 3 года назад

    Nice video bro, which code editor are you using? Please tell as I am exploring different kinds of code editors.

  • @nacho10f
    @nacho10f 5 лет назад

    Amazing!!! succinct and clear. Bookmarked :D

  • @mehmetkose2961
    @mehmetkose2961 5 лет назад

    finally a different example from the F todo apps

  • @kartikajas
    @kartikajas 6 лет назад

    Hi Angular Firebase, This is really a best tutorial when practiced. I have post modules and gallery modules where I need the upvotes and downvotes. Do I create the upvote and the downvote as a shared reducer or each module should have duplicated upvotes and downvote again?

  • @RonanConnolly
    @RonanConnolly 3 года назад

    Great tutorial, what css styles / ui lib are you using in this tutorial?

  • @ganeshrajan7082
    @ganeshrajan7082 6 лет назад

    This is an awesome tutorial

  • @beyondthenature
    @beyondthenature 3 года назад

    Hi there, very interesting! quick question, did you make any further video later ? I mean recently in 2020 ?

  • @USONOFAV
    @USONOFAV 6 лет назад

    Facebook initially messed up the implementation on MVC pattern in their code. They fixed it up applied memento pattern and called it Flux. So Flux=MVC+Memento+Observer.

  • @1osmit
    @1osmit 3 года назад

    Your video helped me a lot, but i had to read trough the documentation before to fully understand, nevertheless, good job!

  • @sarojapatil7885
    @sarojapatil7885 4 года назад

    Click on Spanish Hola mundo state sould display right ? Why its displaying Bonjour le ?

  • @Michael-kw6bs
    @Michael-kw6bs 4 года назад

    I don't like overheat solutions, BehaviourSubject is nice and clear. Maybe i am wrong but if you do this on massive project you will have massive problem i think because only small group of people can make changes in available time. But great tutorial !D Thanks a lot again :).

  • @brunoccs
    @brunoccs 5 лет назад

    Let say I use Redux to keep track of changes on my entities being displayed on a index, a list for a CRUD. So every time the user creates/deletes/updates one single entity, I have to dispatch an action to update my entities store. That in turn will make another copy of my entities (my state), that mean that if I have 30 items on the list, every state change will spawn another array with 30 items or so in it. After a while if the user keep making CRUD operations, won't my app end up bloated and slow?

  • @teragram8006
    @teragram8006 6 лет назад

    @3:45, when the button is clicked the console seems to be outputting the previous state not the new state

  • @AmosWachangaW
    @AmosWachangaW 6 лет назад

    Nice walkthrough

  • @markgoho
    @markgoho 7 лет назад +8

    Instead of Object.assign, why not use the Object spread operator?

    • @Fireship
      @Fireship  7 лет назад +9

      Stay tuned. I am releasing another video tomorrow about ngrx/effects that will refactor this function with the spread syntax. I wanted to include Object.assign in this video because is easier to understand IMO.

    • @markgoho
      @markgoho 7 лет назад +1

      Oh totally! The spread operators, especially Object spread and the syntax is a little hard to follow when first seeing it.

  • @themanthis837
    @themanthis837 6 лет назад

    Hmm Immutable data concept, interesting, ty for video.

  • @aussieraver7182
    @aussieraver7182 3 года назад

    I'm still learning but whats the difference between setting a singleton service compared to using ngrx store?
    Doesn't the singleton service contain a state throughout the application or am I wrong?

  • @argdeal9491
    @argdeal9491 6 лет назад

    Question: State in Redux is immutable object. So why you mutate the state in simpleReducer function? I mean the follow code: return state = 'Hola Mundo', in video it is in 2:30

    • @Lowwlander
      @Lowwlander 6 лет назад

      In this tiny example the state is just a string. And strings in JavaScript are immutable.

  • @azexperiment4589
    @azexperiment4589 6 лет назад

    Thanks for the video bro.

  • @Reaper_f30
    @Reaper_f30 5 лет назад

    A selector would come into play if say you wanted to change the value of a variable. correct??

  • @peterveliki7918
    @peterveliki7918 4 года назад

    How come you didn't import the FormsModule and you still could use `ngModel` ?? ...

  • @andrey1de
    @andrey1de 5 лет назад

    Thank for open new door in UI world !!!

  • @daibergonzalez6498
    @daibergonzalez6498 6 лет назад

    Yo entiendo muy poco ingles, pero el video estuvo genial, ahora se usar Redux, muchas gracias

  • @elberthcabrales1361
    @elberthcabrales1361 6 лет назад

    Thenk you great tutorial

  • @infomastercode6961
    @infomastercode6961 6 лет назад

    Thanks for advance
    Your code is pretty.

  • @tlotliotllotlleng2380
    @tlotliotllotlleng2380 3 года назад

    Do you know how to use the new pattern used in ngrx

  • @094808064
    @094808064 3 года назад

    Does using this provides any advantage over the out-of-the-box features of angular?

  • @abhaypratapchaudhary7797
    @abhaypratapchaudhary7797 4 года назад

    @3:45 on clicking spanish it says good morning which is english ? kindly clear

  • @gorley9261
    @gorley9261 3 года назад

    First 90 seconds. Just wow!

  • @ricko13
    @ricko13 3 года назад +1

    Nice *BOILERPLATE* tho

  • @NikhilMahirrao
    @NikhilMahirrao 6 лет назад +6

    To fast to understand

  • @tinhevol5758
    @tinhevol5758 5 лет назад +1

    Great! Thanks

  • @mymusic7262
    @mymusic7262 3 года назад +1

    Does anyone remember the good old days of Classic ASP?

  • @kumargaurav7504
    @kumargaurav7504 5 лет назад

    Well, that's some good material.

  • @kicsiqki
    @kicsiqki 5 месяцев назад

    It was hard to follow from the get-go, after 4 minutes and 50 seconds (with me re-watching snippets multiple times) I gave up. Cant follow what is happening, what things are, what things are connected, even what are actual commands and what are custom names and variables.

  • @arsimdemiri1762
    @arsimdemiri1762 3 года назад

    he was explaining this to him self :P

  • @findjonmoses
    @findjonmoses 6 лет назад

    I tried to run this example without using a template variable but dot notation instead and it would not work, I just kept getting [Object object] - why do I need a template variable here? I also cant find any info on them in the Angular docs :(

    • @Fireship
      @Fireship  6 лет назад

      Are you trying to show the entire object in html? If so use the json pipe {{ obj | json }}

    • @findjonmoses
      @findjonmoses 6 лет назад

      Hey thanks for the reply...not trying to show the entire object but I thought I could do something like {{ object.property }} but this doesn't seem to work unless I set the object to a template variable e.g. "object as o" and then I can do {{ o.property }}. I wanted to know using the "as" keyword is required for using an object in the {{}}. Im coming from AngularJS and trying to learn Angular

  • @FabioGiaffaglione
    @FabioGiaffaglione 5 лет назад

    What happens when you refresh the page on the browser? Has the Store persistence of the last state? Or simply will be it reset to the default state?

    • @Fireship
      @Fireship  5 лет назад

      The state resets. There are different strategies out there to rehydrate on full page loads github.com/ngrx/platform/issues/856

  • @drupi.0
    @drupi.0 3 года назад

    How did you do that copy and paste?

  • @heavestern
    @heavestern 5 лет назад

    I could only watch this at 2x speed tyvm

  • @EntrepreneurmapHome
    @EntrepreneurmapHome 6 лет назад

    I got to 7 minutes and then gave up, some of your later code edits have code missing from previous edits or the cloned code is different to the screenshot versions - very confusing? Look at all the times you edit the app.component.ts file and you'll see what I'm referring to, refer to the cloned version as a start point.

  • @pratz_photography
    @pratz_photography 6 лет назад +4

    It's too fast. Very difficult to understand