Connecting Redux to Edit a Newsletter
Guide Tasks
  • Read Tutorial
  • Watch Guide Video
Video locked
This video is viewable to users with a Bottega Bootcamp license

[00:00:01] Hi. Welcome back to the reactor cores in this guide. We are going to be using redux connect and maps the props with connect to basically allow us to connect our store so we can receive and receive state receive state and dispatch actions so we'll also be importing our actions and his guide. And then after after that and the next guide we will hop into fetching the newsletter Bayani which we already have set up so we'll go over all that junk. But yeah that's the next guy. So let's focus on doing this. That should be really quickly. First things first let's look at her sign in and basically look at what we have to do. So first thing we need is well real quick. I made a typo here in Alaska. I'm going to say every tax form with a capital if I noticed it wasn't working and that's why so here's wasn't working for that same reason. And there's the fix. So real quick or no let me up and let's get on to connecting. Yeah. Saluzzi import connector from reac redux. K No I'm not. Now we just need to throw it in here on honor and newsletter's connect and then the power passing. Well first we need to say that it newsletter and then we need to type on our map seat props and access to state function map state. Two props pass and state then just returned state. And then let's cut that and throw it right above or at a news letter here. Now we don't really need this reference anymore. [00:01:42][101.4]
[00:01:43] We could have done it without it but I wanted to show you that it was very similar. Let's get rid of this here and one thing I noticed we didn't do is handle form submit. We are seeing know that's we want to change that to Vadi entitles and Dayalan body and let's just say console log trying to handle it. Let's go to the browser and has that out its reload it and then hit it. Mullins is safe. You'll notice it's working now and are still trying to analyze it. Now let's go back in here and once import our actions so import star as actions from actions that will give us access to these actions here and the one we'll be using when we in the next guide is fetch newsletter by so we can get the newsletter in there and into our stores. So let's go ahead and down here. It's passing out state props newsletter. And of course that will give us access to those actions. So in the next guide we will be utilizing that function that we've already written and we will do that in the completed amount and then will display the information in our form so we can see it like we do in the design community code and then get into. It's not as either get commit and let's just say into the docs and connect. Okay I'll catch the next get. [00:01:43][0.0]
[101.4]