I'm re-learning Redux now, does anyone else think that it might be overkill for an app that doesn't require any user input?
Show HN: Redux Offline – Build Offline-First Apps for Web and React Native
11–20 of 42 posts
Re: Show HN: Redux Offline – Build Offline-First Apps for Web and React Native
#12Slightly off topic, but how do people manage state that aren't using Redux? When you google "redux alternatives", you typically get results for different flavors or variants of redux. But are there other fundamentally different paradigms for managing state? I love Redux, but I'm really curious what else is out. Also, the optimistic updates with rollbacks in this implementation is pretty neat.
MobX is quite popular, and I wouldn't call it a variant of redux. Also, just storing state in your higher level components can work for much more complicated apps than many think.
To elaborate: in 'response' to the webdev tendency I have to use the latest and greatest, and the HN articles about this phenomenon, I've done a few React projects with a conservative mindset.
React-router I don't miss too much for much of it. I could also do without a bunch of ES6/7 features, TypeScript, and so on. But with each of these projects I wish I'd used Redux, MobX, Baobab, and so on instead of the 'vanilla' approach of keeping state in my higher level components.
tl;dr: if you're gonna be conservative, leave state management as the last thing you 'conserve' on.
Re: Show HN: Redux Offline – Build Offline-First Apps for Web and React Native
#13Slightly off topic, but how do people manage state that aren't using Redux? When you google "redux alternatives", you typically get results for different flavors or variants of redux. But are there other fundamentally different paradigms for managing state? I love Redux, but I'm really curious what else is out. Also, the optimistic updates with rollbacks in this implementation is pretty neat.
I've been using baobab[1] which is: > a JavaScript persistent and immutable (at least by default) data tree supporting cursors and enabling developers to easily navigate and monitor nested data through events. It's a fairly simple library to read and understand and it's well written. I have a couple decent sized SPAs working on top of it, and I store the full data tree using localForage for offline use. 1: https://gi…
Re: Show HN: Redux Offline – Build Offline-First Apps for Web and React Native
#14I'm re-learning Redux now, does anyone else think that it might be overkill for an app that doesn't require any user input?
That said, even for relatively simple, non-input type projects I've found that Redux is worth it. I got thoroughly sick of passing props down multiple levels.
Furthermore, I found that I often ended up making mistakes where my components were too reliant on their context (even when considering variable/prop naming). Redux, I feel, extends the 'pit of success' effect that React has; when I use it I'm more likely to properly isolate components.
Re: Show HN: Redux Offline – Build Offline-First Apps for Web and React Native
#15Slightly off topic, but how do people manage state that aren't using Redux? When you google "redux alternatives", you typically get results for different flavors or variants of redux. But are there other fundamentally different paradigms for managing state? I love Redux, but I'm really curious what else is out. Also, the optimistic updates with rollbacks in this implementation is pretty neat.
Re: Show HN: Redux Offline – Build Offline-First Apps for Web and React Native
#16Slightly off topic, but how do people manage state that aren't using Redux? When you google "redux alternatives", you typically get results for different flavors or variants of redux. But are there other fundamentally different paradigms for managing state? I love Redux, but I'm really curious what else is out. Also, the optimistic updates with rollbacks in this implementation is pretty neat.
This approach matches well with GraphQL (without Relay -- but with Relay I imagine it would fit even better).
Re: Show HN: Redux Offline – Build Offline-First Apps for Web and React Native
#17Slightly off topic, but how do people manage state that aren't using Redux? When you google "redux alternatives", you typically get results for different flavors or variants of redux. But are there other fundamentally different paradigms for managing state? I love Redux, but I'm really curious what else is out. Also, the optimistic updates with rollbacks in this implementation is pretty neat.
Re: Show HN: Redux Offline – Build Offline-First Apps for Web and React Native
#18If anyone is interested in learning Redux, I keep a big list of links to high-quality tutorials and articles on React, Redux, and related topics, at https://github.com/markerikson/react-redux-links . Specifically intended to be a great starting point for anyone trying to learn the ecosystem, as well as a solid source of good info on more advanced topics.
I also maintain a catalog of Redux-related addons and utilities at https://github.com/markerikson/redux-ecosystem-links , which lists things like middleware, store persistence management, pre-built logic for managing collections of data, logging/linting devtools, and much more.
Re: Show HN: Redux Offline – Build Offline-First Apps for Web and React Native
#19Currently creating a cross-platform react native app using realm.io for persistence. While it's is great, the debugging performance is slow (rerouted RPC calls) and it has a few quirks (each model is a proxy, odd optional field support, poor error messages when data is erroneous).
The benefits of this seem to be:
1. Pre-created retry logic, optimistic update logic
2. Less effort to save data to realm
3. Less effort to load data from realm on app reloads
4. Potentially shared actions across our apps/web projects, as there's no realm specific abstraction in our apps.
Gonna have a look at implementing this one day soon to compare and learn :)
Re: Show HN: Redux Offline – Build Offline-First Apps for Web and React Native
#20Slightly off topic, but how do people manage state that aren't using Redux? When you google "redux alternatives", you typically get results for different flavors or variants of redux. But are there other fundamentally different paradigms for managing state? I love Redux, but I'm really curious what else is out. Also, the optimistic updates with rollbacks in this implementation is pretty neat.
Before Redux came out, I built my own state management system around Backbone. I recommend using Redux.