Skip to content

Instantly share code, notes, and snippets.

@muslemomar
Created December 10, 2022 13:09
Show Gist options
  • Save muslemomar/7383376bf331938ca8e268b88cd65f2e to your computer and use it in GitHub Desktop.
Save muslemomar/7383376bf331938ca8e268b88cd65f2e to your computer and use it in GitHub Desktop.
  1. What are the similarities between context, redux, and local state?
  2. What is the difference between an action and an action creator in Redux?
  3. In your own words, what problem does context and Redux aim to solve?
  4. Please fill out the following table.
Tool When should we use this over the others?
Context
Redux
Local state

.5 Which of these should you prefer to use the most and why? Please give more than a one sentence answer.

@Mhamad6000
Copy link

mhamad othman , banel mikhael , shad mustafa , batoul el mansur , ahmad hassoun
1- all of them are for saving data inside variable
2- An action is simply an object that has two things: a type, and a payload. An action creator is simply a function, that just returns an action.
3- both redux and context aim to solve state management , redux is much faster for complex applications .
4- we should use context for small projects and if we have small amount of states , redux is for complex projects and when You have large amounts of application state that are needed in many places in the app we use redux .
5- redux because its faster and used in most companies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment