+ 14

what is redux and how to use it ?

I want to use redux with react but can't find where to start and how to start In sololearn course I can't learn redux Help me!!

10th Jun 2020, 4:54 PM
Coder
Coder - avatar
12 Answers
+ 13
in order to run it in sololearn you'll need 2 cdns.. one for redux: https://cdnjs.com/libraries/redux and for react-redux: https://cdnjs.com/libraries/react-redux first is redux itself, and the second is the binder of redux to react. also to get started with very good explanation i recommend you this video: https://youtu.be/CVpUuw9XSjY the official documentation also helps, but go through the youtube video to find out what store, actions, reducers and dispatchers really are through Ed's examples. also the data flow is very important since you separate all your states from the parent app in a store. documentation for redux: https://redux.js.org/basics/basic-tutorial here is an example from Calvin: https://code.sololearn.com/WiliZc294Lb5/?ref=app
10th Jun 2020, 6:01 PM
Sebastian Pacurar
Sebastian Pacurar - avatar
+ 6
Sebastian Pacurar 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 ꧁༒☬Bad☬Boy☬༒꧂ Sumit Programmer😎😎 Thanks for your answers everyone I will surely take look at the all things that you have given 🥧 Calvin's code is great
11th Jun 2020, 4:40 AM
Coder
Coder - avatar
+ 5
Sebastian Pacurar thanks for the best answer bro that I got on this post
15th Jun 2020, 8:25 AM
Coder
Coder - avatar
+ 3
Redux is Javascript library for maintaing a central state instead of having states in individual components. https://medium.com/javascript-in-plain-english/the-only-introduction-to-redux-and-react-redux-youll-ever-need-8ce5da9e53c6
10th Jun 2020, 5:13 PM
viknesh vikky
viknesh vikky - avatar
+ 3
Coder although we need to take some effort to setup redux with react, once the react-redux is ready with initial state and actions that set from reducer, we will only focus on state retrieval and update. In React Hooks, redux state access is much simple. We use useSelector for state retrieval and useDispatch for trigger state actions which eventually update the state. We don't need read a lot of redux definition from articles from internet, the more we read the more I get confuse about redux. :) We will understand redux, once we have setup and test it with our application data.
12th Jun 2020, 1:51 AM
Calviղ
Calviղ - avatar
+ 3
Calviղ thank for your answer bro
15th Jun 2020, 8:24 AM
Coder
Coder - avatar
10th Jun 2020, 5:03 PM
꧁༒☬Bad☬Boy☬༒꧂
꧁༒☬Bad☬Boy☬༒꧂ - avatar
+ 2
Brother, as much as I know redux, redux work is to share the state between comps. Here is the good explanation video about redux https://youtu.be/9boMnm5X9ak
10th Jun 2020, 5:06 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 2
Redux is a predictable state container for JavaScript applications. It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. Simply put, Redux is a state management tool.
11th Jun 2020, 3:36 AM
Ayush Gupta
Ayush Gupta - avatar
+ 2
Redux is a state-management tool. As the definition suggests, it is used to manage the state of the applications. Redux is a predictable state container for JavaScript applications. It helps you write apps that behave consistently, run in different environments (client, server, and native), and are easy to test. Redux can be used with any JavaScript framework or library. Redux stores the state of the application, and the components can any access the state from a state store. Redux works on three basic principles, Single source of truth - The state of your whole application is stored in an object tree within a single-store. A single state tree also makes it easier to debug or inspect an application. It also enables you to persist your app's state in development, for a faster development cycle. The state is read-only - The only way to change the state is to emit an action, an object describing what happened. This feature ensures that no events like network callbacks or views change the state. They can only express an intent to change the state. Changes are made with pure functions - To specify how actions transform the state tree, you write pure reducers. The user can return new state objects, instead of mutating the previous state. For small applications, state management is easy. For larger applications with many state objects, it becomes tricky. To monitor this, Redux is integrated. JavaScripts libraries like React use the Redux extensions to make the creation of applications easier.
11th Jun 2020, 12:39 PM
Deepak Bhatt
Deepak Bhatt - avatar
+ 1
Redux is a language of computer Learn it by solo learn
12th Jun 2020, 1:11 PM
vineet