Redux (software)

From Wikipedia, the free encyclopedia
(Redirected from Redux (JavaScript library))
Jump to navigation Jump to search
Redux
Original authorsDan Abramov, Andrew Clark
Initial releaseJune 2, 2015; 10 years ago (2015-06-02)[1]
Stable release
5.0.1 / December 23, 2023; 2 years ago (2023-12-23)[2]
Repository
  • {{URL|example.com|optional display text}}Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
Written inTypeScript
Engine
    Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
    PlatformCross-platform software
    TypeJavaScript library
    LicenseMIT License
    Websiteredux.js.org

    Redux is an open-source JavaScript library for managing and centralizing application state. It is most commonly used with libraries such as React or Angular for building user interfaces. It is similar to (and inspired by) Facebook's Flux architecture; the Elm Architecture is also cited as an inspiration.[3] It was created by Dan Abramov and Andrew Clark; since mid-2016, the primary maintainers are Mark Erikson and Tim Dorr.

    Description

    [edit | edit source]

    Redux is a small library with a simple, limited API designed to be a predictable container for application state. It operates in a fashion similar to a reducing function, a functional programming concept.

    History

    [edit | edit source]

    Redux was created by Dan Abramov and Andrew Clark in 2015.[4] Abramov began writing the first Redux implementation while preparing for a conference talk[5] at React Europe[6] on hot reloading. Abramov remarks, "I was trying to make a proof of concept of Flux where I could change the logic. And it would let me time travel. And it would let me reapply the future actions on the code change."[7]

    Abramov was struck by the similarity of the Flux pattern with a reducing function. "I was thinking about Flux as a reduce operation over time... your stores, they accumulate state in response to these actions. I was thinking of taking this further. What if your Flux store was not a store but a reducer function?"[4]

    Abramov reached out to Andrew Clark (author of the Flux implementation Flummox) as a collaborator. Among other things, he credits Clark with making the Redux ecosystem of tools possible, helping to come up with a coherent API, implementing extension points such as middleware and store enhancers.[4]

    By mid 2016, Abramov had joined the React team and passed the primary maintainership on to Mark Erikson and Tim Dorr.[8]

    In February 2019, useReducer was introduced as a React hook in the 16.8 release. It provides an API that is consistent with Redux, enabling developers to create Redux-like stores that are local to component states.[9]

    In October 2019, Redux Toolkit was introduced to simplify writing Redux logic by providing a set of utilities (such as configureStore and createSlice) that wrap and extend the standard Redux API.[10]

    See also

    [edit | edit source]

    Lua error in mw.title.lua at line 392: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').

    References

    [edit | edit source]
    1. ^ Initial release tag
    2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    4. ^ a b c Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    5. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    7. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    8. ^ Idiomatic Redux: The History and Implementation of React-Redux
    9. ^ React v16.8: The One with Hooks
    10. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    [edit | edit source]