Redux: Navigating with React Router <Link>
lessonDuration 2m 38s
We will learn how to change the address bar using a <Link> component from React Router.
Browse
Find courses, lessons, articles, talks, and podcasts.
244 results for "redux"
Showing 169–192 · Page 8 of 11
lessonDuration 2m 38s
We will learn how to change the address bar using a <Link> component from React Router.
lessonDuration 6m 23s
We will learn how to remove the duplication in our reducer files and how to keep the knowledge about the state shape colocated with the newly extracted reducers.
lessonDuration 1m 32s
We will learn about fake backend module that we will be using throughout the next lessons to simulate data fetching.
lessonDuration 4m 52s
We will learn how to encapsulate the knowledge about the state shape in the reducer files, so that the components don’t have to rely on it.
lessonDuration 2m 57s
We will learn how to replace the middleware we wrote and the custom code we used to glue it together with the existing core and third party utilities.
lessonDuration 5m 59s
We will learn how to display the loading indicators while the data is being fetched.
lessonDuration 6m 29s
We will learn how to teach dispatch() to recognize Promises so that we can move the async logic out of the components into asynchronous action creators.
lessonDuration 3m 44sFree
Higher Order Reducers are simple reducer factories, that take a reducer as an argument and return a new reducer. In that new reducer, you can customize the behaviour of the original one which helps reducing the reducer logic. In this lesson, we'll see how to reduce duplicated code by refactoring two different reducers into a higher order reducer.
lessonDuration 6m 27s
In this lesson, we’ll make a few small changes to our scripts and add some environment variables that will be used at build time to get our application ready to be deployed to a production environment using the `now` service. Once properly configured, we’ll use the `now` CLI and publish our application to a production server.
lessonDuration 4m 22s
In this lesson, we’ll wire up React Router to pass a url based filter parameter into our component and create a selector function to filter our state data between the store and our components by hooking into the `ownProps` parameter of `mapStateToProps`.
lessonDuration 2m 50s
In this lesson, we’ll install React Router as a project dependency and add links that will update the url via pushState to avoid reloading our page on changes.
lessonDuration 6m 14s
We’ll use fetch and an async action creator to send a `DELETE` request to the server and update the UI by removing the deleted item and displaying a success message once the save has completed successfully.
lessonDuration 7m 44s
We’ll use fetch and an async action creator to save updated data to the server and update the UI with the result of the update and a success message once the save has completed successfully.
lessonDuration 6m 38s
We’ll use fetch and an async action creator to save updated data to the server and update the UI with the result of the update once the save has completed successfully.
lessonDuration 6m 59s
A connected component will re-render whenever there is a state change. While we want state changes to update our UI, we don’t necessarily want every state change to render every UI component. In this lesson, we’ll use the connect function to connect components to their own specific pieces of the state tree to make our rendering more efficient.
lessonDuration 1m 42s
In this lesson we’ll take a `mapDispatchToProps` function and refactor it to use the available shorthand syntax to tidy our code up a bit.
lessonDuration 7m 27sFree
Learn how to add a simple Redux-backed React component to a new Rails 5 app using React on Rails.
lessonDuration 4m 45s
Manually creating action items every time we need to dispatch an action eventually accumulates to a very tedious process. In this lesson, we will learn how to abstract out the creation of action items so that we consolidate their creation into a single place. This not only creates efficiencies in how we express code but also reduces code volume while simultaneously increasing stability.
lessonDuration 8m 45s
In this lesson, we are going to learn how to map our Angular component directly to our application store using the connect method on ngRedux. In Angular, it is a common technique to bind a controller property directly to the model so that our controllers remain lightweight and operate more as a pass through mechanism than anything else. Using the connect method, we can accomplish the same effect by not only binding properties directly to the application store, but also binding our controller to our action creators. This allows us to drastically simplify our controllers as we are able to delete a bunch of local controller methods as they become unnecessary because of our mappings.
lessonDuration 5m 59s
In this lesson, we are going to extend our application store with a subscribe method so that we do not have to manually query our application store every time we dispatch an action. In our categories controller, we are dispatching a **GET_CATEGORIES** action every time we want to update the categories collection within our application store. For this change to be propagated back into our controller, we need to call **store.getState**. Depending on how many times we are calling **store.dispatch**, this could get very cumbersome. We will extend our application by adding a subscribe method so that state changes are automatically pushed into our controller.
lessonDuration 5m 45s
In this lesson, we are going to learn how to build an application store so that we can have a single place to store our application state. Reducers are great for updating state because they are stateless, but they are very bad at preserving state, which is vital when you need to reference state in more than one place. We will build out a simple application store that will be responsible for keeping track of our categories collection that our categories controller can consume.
lessonDuration 9m 52s
In this lesson, we are are going to learn how to abstract out state mutations into a reducer. In our current Eggly application, all of the state and business logic for our categories is handled within the categories model. We are going to refactor our code to entirely eliminate the need for our categories model by building out a couple of reducers and seeing how we can interact with them directly. The key thing to notice as we build out our reducers is that a reducer itself is completely stateless because it receives current state every single time it needs to calculate and return the new state. With a clearly defined contract of inputs and outputs, this makes testing reducers really easy which is one of the huge benefits of using this approach.
podcast
<p>Sara Vieira, developer advocate and professional maker of dumb shit, talks through why she does her weird experiments on the internet. Sometimes it is out of need, but honestly a lot of the time it is a random thing that she thinks of or something that someone says that brings up the idea, and she just has to make it. A lot of it is out of boredom, and also procrastination from other projects that she just doesn't want to do. </p><p>Sara calls herself a lazy developer, but that doesn't mean she isn't working. She finds simpler solutions that involve less coding and also avoids things that aren't necessarily interesting or fun for her to do, like CSS or writing her talk for a conference... A part of being a lazy developer is using the right tool for the job. GraphQL and Redux have an almost cult-like following, but for small apps, their solutions for state management and fetching data are complete overkill.</p><p>Netlify and Zeit's Now are great for deploying your projects, they allow you to get your unique dumb-shit out there quickly. There was this period where services were all focusing on scalability, but it wasn't easy to just throw your wacky side-projects out on the internet. </p><p>Sara is organizing the conference ReactJS Girls which will be happening in London on May 3rd, 2019. It started last year while Sara was living in London. She hosted a meetup where all the speakers would be women, but everyone was welcome to attend as a guest. Organizing it this way had multiple benefits, it acted as a filter for the dicks who wouldn't want to learn from women, and it empowered first-time speakers who'd otherwise feel imposter syndrome or fear of judgment. </p><hr /><h3>Transcript</h3><p><a href="https://egghead.simplecast.com/episodes/a63f7af2/transcript">"Making Dumb Stuff That Makes Strangers on the Internet Smile - with Sara Vieira" Transcript</a></p><h3>Resources:</h3><ul><li><a href="https://reactjsgirls.com">ReactJS Girls Conference</a></li><li><a href="https://twitter.com/reactjsgirls?lang=en">ReactJS Girls Twitter</a></li><li><a href="https://meme.iamsaravieira.com/">meme.iamsaravieira.com</a></li><li><a href="https://dan.church/">dan.church</a></li><li><a href="https://awesometalks.party/">awesometalks.party</a></li></ul><h3>Sara Vieira:</h3><ul><li><a href="https://twitter.com/NikkitaFTW">Twitter</a></li><li><a href="https://iamsaravieira.com/">Website</a></li><li><a href="https://github.com/SaraVieira">GitHub</a></li><li><a href="https://medium.com/@nikkitaftw">Medium</a></li></ul><h3>Joel Hooks</h3><ul><li><a href="https://twitter.com/jhooks">Twitter</a></li><li><a href="https://joelhooks.com/">Website</a></li></ul>
course
Almost every React application needs to fetch data from a server and cache the result between renders. Traditionally, in-memory API Caching is something that has been done in React applications either on a per-component-level, which lead to application state running out of sync, or using a global state like Redux, which required a lot of hand-written code. RTK Query is part of the official Redux Toolkit and provides an application-global API cache that abstracts most of that hand-written code away, leading to a lot more readable code bases. It also offers a lot of advanced features like auto-generated hooks In this course, you will learn about - Using `createApi` to define multiple endpoints to interact with your API - The auto generated `useQuery` hooks and how to use them in your application - The RTK Query Dataflow and the role of the `baseQuery` function - The Redux Devtools “RTK Query” Monitor and which actions are flowing though your app - How to use RTK Query either with an `ApiProvider` or a pre-existing Redux store - Using RTK Query with TypeScript