<commit_before>---
published: true
title: Redux
tags: js react.js
---
> a library to manage state globally - [Redux](https://redux.js.org/)

- single source of truth
- state is read only
- changes using pure function (create a new state)

Can work independantly or with react.js

Use Flux Pattern:
Action -> Dispatcher -> Store -> View<commit_msg>Create 2021-10-18-js-redux.md<commit_after>---
published: true
title: Redux
tags: js react.js
---
> a library to manage state globally - [Redux](https://redux.js.org/)

- single source of truth
- state is read only
- changes using pure function (create a new state)

Can work independantly or with react.js

Use Flux Pattern (one way dataflow):
Action -> Dispatcher -> Store -> View
{'fraction_non_alphanumeric': 0.11385459533607682, 'fraction_numerical': 0.010973936899862825, 'mean_word_length': 3.5625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4796787', 'n_tokens_mistral': 230, 'n_tokens_neox': 219, 'n_words': 91}