Tag: Redux

  • On MobX Redux dilemma

    In my experiences using MobX as a state management library produces less code and lets you get things done quicker (two-folded knife!) but with Redux you get a lot of stuff for free – most notable is scalable approach to architecture and maintenance of web applications. I personally prefer Redux also because it’s functional like…

  • The best way of rendering a collection of items in React/Redux

    In short The best way to render a collection in React, backed by Redux or other similar library: store a collection as an object where key is item id and value is item itself. That way when rendering collection, pass only item’s id to the item component. Than in item’s connected component query a collection…

  • How to reduce amount of dispatched actions in Redux

    When I was beginner in using Redux to manage state in JavaScript while using React, I often dispatched unnecessary amount of actions when I could be done with just one or two. Or when I was loading initial data when user visits website, I often dispatched an action that set only specific resource. Something like…

  • Using Ramda’s evolve in Redux reducers to create new state

    Ramda is a JavaScript utility library similar to lodash or underscore ((I haven’t used underscore in ages though)) with an extra touch – it’s designed to be better suited to functional style of programming. For example it provides automatic currying ((Remodeling function in a way that instead of accepting multiple arguments at once it accepts…