Skip to content

Megabite1997/React-Redux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React-Redux My Skills

A dummy website using React, React-Redux, and Redux-Toolkit libraries.

Core Redux Concepts

Core Redux Concepts

There is a slightly easier way of using 'Redux' as well.

A couple problems we could be facing here, if our application would continue to grow.

  1. First potential issue can be our "action types" you have typos on "action types", it won't be handled by the reducer, or won't be handled correctly.

  2. Second potential issue is "the amount of data" The more different pieces of state we have, the bigger our state objects get. That means we need to copy a lot of state. when we update the counter we still need to copy and keep all the other state properties, and it also means that this reducer function gets longer and longer and all of a sudden we might have an unmaintainable big Redux file.

  3. Third potential issue is "state immutability"

Solution

Use "Redux Toolkit" library, which makes working with Redux more convenient and easier. Uninstall "Redux" because that is already included in "Redux toolkit"

What is an 'action creator'?

When you create a slice, "createSlice", which has reducer functions. The "action creator" will be created automatically when you create a reducer function, They are going to have the same name as reducer functions. For example,

Untitled

About

Using React, React-Redux libraries and Redux-Toolkit.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published