2024-02-04T05:28:29.300Z
nova-2
2-general-nova
2024-01-09.29447
30089e05-99d1-4376-b32e-c263170674af
61f41a2a-9233-4e7f-9dde-668af6f6e513
72818f49a02f778916c725d5443df912095c535b351340cbb7fee2cceaeb17e7
67875a7f-c9c4-48a0-aa55-5bdb8a91c34a
deprecated
Redux, a single source of truth for all the data in your JavaScript application.
Modern web applications are represented as a complex tree of components, Components that constantly produce and share data called state.
And when state is decentralized, it can become difficult to understand and test.
Redux is both a pattern and library that helps developers implement complex state management requirements at scale.
It was created by Dan Abramov and Andrew Clark at Facebook, and is one of the most loved and hated libraries in the React ecosystem.
It relies on a single immutable object to store all of the application state, kind of like a client by database.
To change the state, like when a button is clicked, an action will be dispatched, which has a name like an event and a payload with the data that it wants to change.
Remember, the store is immutable, so to change the state of the application, an entirely new object is created by passing the current state and the action payload into a reducer function, which returns a new object with the entire application state.
The end result is a one way data flow that is predictable and testable, and Also opens the door to awesome dev tools that allow you to time travel through your application's data, but it comes at a cost of additional boilerplate code that might add too much complexity to a smaller project.
To get started, create a React app with your favorite tool, then install the Redux toolkit.
1st, use configure store to set up the global store object which will register any reducers to find elsewhere in the code, then provider will make its data accessible to the entire component tree.
Next, create a slice like pizza to represent some data in the store.
It should have a unique name and initial state, but most importantly, it contains a collection of reducers which are functions that take the old state and an action, then define the logic required to change the state.
Redux Toolkit We'll automatically generate actions that correspond to the names of these reducer functions.
We can export them, then put them to use in an actual UI component.
The beauty of Redux is that we can select data anywhere in the application without the need for context or prop drilling.
Instead, we can grab any reactive value or slice in the store with the use selector hook.
Now to change the application's data, an action needs to be dispatched to the store.
That can be accomplished with the useDispatch hook, which might send an action name and data payload on a normal browser event like a button click.
Now serve the application and install the Redux DevTools Browser extension.
Unlike a normal project, you're able to inspect and debug the entire timeline of actions and state changes in your application.
This has been Redux in 100 seconds.
Upgrade to Fireship Pro if you wanna learn all kinds of other React concepts in a format like this.
Thanks for watching, and I will see you in the next one.

Speaker 0: Redux, a single source of truth for all the data in your JavaScript application. Modern web applications are represented as a complex tree of components, Components that constantly produce and share data called state. And when state is decentralized, it can become difficult to understand and test. Redux is both a pattern and library that helps developers implement complex state management requirements at scale. It was created by Dan Abramov and Andrew Clark at Facebook, and is one of the most loved and hated libraries in the React ecosystem.

It relies on a single immutable object to store all of the application state, kind of like a client by database. To change the state, like when a button is clicked, an action will be dispatched, which has a name like an event and a payload with the data that it wants to change. Remember, the store is immutable, so to change the state of the application, an entirely new object is created by passing the current state and the action payload into a reducer function, which returns a new object with the entire application state. The end result is a one way data flow that is predictable and testable, and Also opens the door to awesome dev tools that allow you to time travel through your application's data, but it comes at a cost of additional boilerplate code that might add too much complexity to a smaller project. To get started, create a React app with your favorite tool, then install the Redux toolkit.

1st, use configure store to set up the global store object which will register any reducers to find elsewhere in the code, then provider will make its data accessible to the entire component tree. Next, create a slice like pizza to represent some data in the store. It should have a unique name and initial state, but most importantly, it contains a collection of reducers which are functions that take the old state and an action, then define the logic required to change the state. Redux Toolkit We'll automatically generate actions that correspond to the names of these reducer functions. We can export them, then put them to use in an actual UI component.

The beauty of Redux is that we can select data anywhere in the application without the need for context or prop drilling. Instead, we can grab any reactive value or slice in the store with the use selector hook. Now to change the application's data, an action needs to be dispatched to the store. That can be accomplished with the useDispatch hook, which might send an action name and data payload on a normal browser event like a button click. Now serve the application and install the Redux DevTools Browser extension.

Unlike a normal project, you're able to inspect and debug the entire timeline of actions and state changes in your application. This has been Redux in 100 seconds. Upgrade to Fireship Pro if you wanna learn all kinds of other React concepts in a format like this. Thanks for watching, and I will see you in the next one.
Redux, a single source of truth for all the data in your JavaScript application. Modern web applications are represented as a complex tree of components, Components that constantly produce and share data called state. And when state is decentralized, it can become difficult to understand and test. Redux is both a pattern and library that helps developers implement complex state management requirements at scale. It was created by Dan Abramov and Andrew Clark at Facebook, and is one of the most loved and hated libraries in the React ecosystem. It relies on a single immutable object to store all of the application state, kind of like a client by database. To change the state, like when a button is clicked, an action will be dispatched, which has a name like an event and a payload with the data that it wants to change. Remember, the store is immutable, so to change the state of the application, an entirely new object is created by passing the current state and the action payload into a reducer function, which returns a new object with the entire application state. The end result is a one way data flow that is predictable and testable, and Also opens the door to awesome dev tools that allow you to time travel through your application's data, but it comes at a cost of additional boilerplate code that might add too much complexity to a smaller project. To get started, create a React app with your favorite tool, then install the Redux toolkit. 1st, use configure store to set up the global store object which will register any reducers to find elsewhere in the code, then provider will make its data accessible to the entire component tree.
software
software development
computer science
systems
technology
Next, create a slice like pizza to represent some data in the store. It should have a unique name and initial state, but most importantly, it contains a collection of reducers which are functions that take the old state and an action, then define the logic required to change the state.
Redux Toolkit We'll automatically generate actions that correspond to the names of these reducer functions. We can export them, then put them to use in an actual UI component. The beauty of Redux is that we can select data anywhere in the application without the need for context or prop drilling. Instead, we can grab any reactive value or slice in the store with the use selector hook. Now to change the application's data, an action needs to be dispatched to the store.
software
software development
mining
data management
That can be accomplished with the useDispatch hook, which might send an action name and data payload on a normal browser event like a button click. Now serve the application and install the Redux DevTools Browser extension. Unlike a normal project, you're able to inspect and debug the entire timeline of actions and state changes in your application. This has been Redux in 100 seconds. Upgrade to Fireship Pro if you wanna learn all kinds of other React concepts in a format like this. Thanks for watching, and I will see you in the next one.
Redux, a single source of truth for all the data in your JavaScript application. Modern web applications are represented as a complex tree of components, Components that constantly produce and share data called state. And when state is decentralized, it can become difficult to understand and test. Redux is both a pattern and library that helps developers implement complex state management requirements at scale. It was created by Dan Abramov and Andrew Clark at Facebook, and is one of the most loved and hated libraries in the React ecosystem. It relies on a single immutable object to store all of the application state, kind of like a client by database. To change the state, like when a button is clicked, an action will be dispatched, which has a name like an event and a payload with the data that it wants to change. Remember, the store is immutable, so to change the state of the application, an entirely new object is created by passing the current state and the action payload into a reducer function, which returns a new object with the entire application state. The end result is a one way data flow that is predictable and testable, and Also opens the door to awesome dev tools that allow you to time travel through your application's data, but it comes at a cost of additional boilerplate code that might add too much complexity to a smaller project. To get started, create a React app with your favorite tool, then install the Redux toolkit. 1st, use configure store to set up the global store object which will register any reducers to find elsewhere in the code, then provider will make its data accessible to the entire component tree. Next, create a slice like pizza to represent some data in the store. It should have a unique name and initial state, but most importantly, it contains a collection of reducers which are functions that take the old state and an action, then define the logic required to change the state. Redux Toolkit We'll automatically generate actions that correspond to the names of these reducer functions. We can export them, then put them to use in an actual UI component. The beauty of Redux is that we can select data anywhere in the application without the need for context or prop drilling. Instead, we can grab any reactive value or slice in the store with the use selector hook. Now to change the application's data, an action needs to be dispatched to the store. That can be accomplished with the useDispatch hook, which might send an action name and data payload on a normal browser event like a button click. Now serve the application and install the Redux DevTools Browser extension. Unlike a normal project, you're able to inspect and debug the entire timeline of actions and state changes in your application. This has been Redux in 100 seconds. Upgrade to Fireship Pro if you wanna learn all kinds of other React concepts in a format like this. Thanks for watching, and I will see you in the next one.
Redux,
redux
a
a
single
single
source
source
of
of
truth
truth
for
for
all
all
the
the
data
data
in
in
your
your
JavaScript
javascript
application.
application
Modern
modern
web
web
applications
applications
are
are
represented
represented
as
as
a
a
complex
complex
tree
tree
of
of
components,
components
Components
components
that
that
constantly
constantly
produce
produce
and
and
share
share
data
data
called
called
state.
state
And
and
when
when
state
state
is
is
decentralized,
decentralized
it
it
can
can
become
become
difficult
difficult
to
to
understand
understand
and
and
test.
test
Redux
redux
is
is
both
both
a
a
pattern
pattern
and
and
library
library
that
that
helps
helps
developers
developers
implement
implement
complex
complex
state
state
management
management
requirements
requirements
at
at
scale.
scale
It
it
was
was
created
created
by
by
Dan
dan
Abramov
abramov
and
and
Andrew
andrew
Clark
clark
at
at
Facebook,
facebook
and
and
is
is
one
one
of
of
the
the
most
most
loved
loved
and
and
hated
hated
libraries
libraries
in
in
the
the
React
react
ecosystem.
ecosystem
It
it
relies
relies
on
on
a
a
single
single
immutable
immutable
object
object
to
to
store
store
all
all
of
of
the
the
application
application
state,
state
kind
kind
of
of
like
like
a
a
client
client
by
by
database.
database
To
to
change
change
the
the
state,
state
like
like
when
when
a
a
button
button
is
is
clicked,
clicked
an
an
action
action
will
will
be
be
dispatched,
dispatched
which
which
has
has
a
a
name
name
like
like
an
an
event
event
and
and
a
a
payload
payload
with
with
the
the
data
data
that
that
it
it
wants
wants
to
to
change.
change
Remember,
remember
the
the
store
store
is
is
immutable,
immutable
so
so
to
to
change
change
the
the
state
state
of
of
the
the
application,
application
an
an
entirely
entirely
new
new
object
object
is
is
created
created
by
by
passing
passing
the
the
current
current
state
state
and
and
the
the
action
action
payload
payload
into
into
a
a
reducer
reducer
function,
function
which
which
returns
returns
a
a
new
new
object
object
with
with
the
the
entire
entire
application
application
state.
state
The
the
end
end
result
result
is
is
a
a
one
one
way
way
data
data
flow
flow
that
that
is
is
predictable
predictable
and
and
testable,
testable
and
and
Also
also
opens
opens
the
the
door
door
to
to
awesome
awesome
dev
dev
tools
tools
that
that
allow
allow
you
you
to
to
time
time
travel
travel
through
through
your
your
application's
application's
data,
data
but
but
it
it
comes
comes
at
at
a
a
cost
cost
of
of
additional
additional
boilerplate
boilerplate
code
code
that
that
might
might
add
add
too
too
much
much
complexity
complexity
to
to
a
a
smaller
smaller
project.
project
To
to
get
get
started,
started
create
create
a
a
React
react
app
app
with
with
your
your
favorite
favorite
tool,
tool
then
then
install
install
the
the
Redux
redux
toolkit.
toolkit
1st,
1st
use
use
configure
configure
store
store
to
to
set
set
up
up
the
the
global
global
store
store
object
object
which
which
will
will
register
register
any
any
reducers
reducers
to
to
find
find
elsewhere
elsewhere
in
in
the
the
code,
code
then
then
provider
provider
will
will
make
make
its
its
data
data
accessible
accessible
to
to
the
the
entire
entire
component
component
tree.
tree
Next,
next
create
create
a
a
slice
slice
like
like
pizza
pizza
to
to
represent
represent
some
some
data
data
in
in
the
the
store.
store
It
it
should
should
have
have
a
a
unique
unique
name
name
and
and
initial
initial
state,
state
but
but
most
most
importantly,
importantly
it
it
contains
contains
a
a
collection
collection
of
of
reducers
reducers
which
which
are
are
functions
functions
that
that
take
take
the
the
old
old
state
state
and
and
an
an
action,
action
then
then
define
define
the
the
logic
logic
required
required
to
to
change
change
the
the
state.
state
Redux
redux
Toolkit
toolkit
We'll
we'll
automatically
automatically
generate
generate
actions
actions
that
that
correspond
correspond
to
to
the
the
names
names
of
of
these
these
reducer
reducer
functions.
functions
We
we
can
can
export
export
them,
them
then
then
put
put
them
them
to
to
use
use
in
in
an
an
actual
actual
UI
ui
component.
component
The
the
beauty
beauty
of
of
Redux
redux
is
is
that
that
we
we
can
can
select
select
data
data
anywhere
anywhere
in
in
the
the
application
application
without
without
the
the
need
need
for
for
context
context
or
or
prop
prop
drilling.
drilling
Instead,
instead
we
we
can
can
grab
grab
any
any
reactive
reactive
value
value
or
or
slice
slice
in
in
the
the
store
store
with
with
the
the
use
use
selector
selector
hook.
hook
Now
now
to
to
change
change
the
the
application's
application's
data,
data
an
an
action
action
needs
needs
to
to
be
be
dispatched
dispatched
to
to
the
the
store.
store
That
that
can
can
be
be
accomplished
accomplished
with
with
the
the
useDispatch
usedispatch
hook,
hook
which
which
might
might
send
send
an
an
action
action
name
name
and
and
data
data
payload
payload
on
on
a
a
normal
normal
browser
browser
event
event
like
like
a
a
button
button
click.
click
Now
now
serve
serve
the
the
application
application
and
and
install
install
the
the
Redux
redux
DevTools
devtools
Browser
browser
extension.
extension
Unlike
unlike
a
a
normal
normal
project,
project
you're
you're
able
able
to
to
inspect
inspect
and
and
debug
debug
the
the
entire
entire
timeline
timeline
of
of
actions
actions
and
and
state
state
changes
changes
in
in
your
your
application.
application
This
this
has
has
been
been
Redux
redux
in
in
100
100
seconds.
seconds
Upgrade
upgrade
to
to
Fireship
fireship
Pro
pro
if
if
you
you
wanna
wanna
learn
learn
all
all
kinds
kinds
of
of
other
other
React
react
concepts
concepts
in
in
a
a
format
format
like
like
this.
this
Thanks
thanks
for
for
watching,
watching
and
and
I
i
will
will
see
see
you
you
in
in
the
the
next
next
one.
one
success
In this video, the speaker explains the concept of Redux, a library used in web applications that store data on all components in a single source. Redux is a pattern and a library used to manage application state, and can be difficult to understand and test. The speaker provides instructions on creating a React app with Redux, installing the Redux toolkit, and using the use committee store to set up the global store object, provider, and slice. Redux is a way to change application data without the need for context or prop drilling, and can be addressed by using the use committee store and upgrading to Fireship Pro.
Redux in 100 Seconds
Redux is a popular state management pattern for large-scale web applications. Learn the basics of the Redux with React https://fireship.io/courses/react/

#js #webdev #100SecondsOfCode

🔗 Resources

Redux Toolkit https://redux-toolkit.js.org/
100 Seconds of React https://youtu.be/Tn6-PIqc4UM
Should I use Redux? https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367


🔥 Get More Content - Upgrade to PRO

Upgrade to Fireship PRO at https://fireship.io/pro
Use code lORhwXd2 for 25% off your first payment. 

🎨 My Editor Settings

- Atom One Dark 
- vscode-icons
- Fira Code Font

🔖 Topics Covered

- What is Redux?
- Should I use Redux in my app?
- Redux quickstart tutorial
- How does redux patter work?
- Why do some developers hate Redux?