# Redux

## What's Redux?

Redux is a tool for managing your front-end state. It is often used in conjunction with React.js, but it can be used with other libraries and frameworks too.

Note that Redux is often overkill for small apps. The overhead is often not worth the trouble. In general try to write your app with the tools that come packed with React. Do you feel that your front-end data is getting difficult to manage? Then have a look at Redux to see if it can solve your problem.\
\
To quote <https://redux.js.org/faq/general>:

> In general, use Redux when you have reasonable amounts of data changing over time, you need a single source of truth, and you find that approaches like keeping everything in a top-level React component's state are no longer sufficient.

\
However, because we are using Redux in some places to manage the state, it is good to become familiar with it. So despite not being necessary for our assignment, we are going to use Redux here.

{% hint style="info" %}
I recommend following the tutorial on <https://redux.js.org/> to get started.
{% endhint %}

{% hint style="info" %}
If you have a Twitter-account, I recommend following Dan Abramov who works for Facebook on React and also helped create Redux and Create React App: <https://twitter.com/dan_abramov>&#x20;
{% endhint %}

{% hint style="warning" %}
When got everything set-up and you fire actions, but nothing seems to happen - make sure you have connected your component to the Redux-store.
{% endhint %}
