Live data from Hacker News

Overmind.js – Frictionless State Management

overmindjs.org

21–30 of 48 posts

Re: Overmind.js – Frictionless State Management

#21
post #3

Read through the overview and the introduction and literally could not tell what Overmind was supposed to be helping with. Everything shown looks like just basic examples of using state normally in JavaScript. What does it actually do ?

Lib like this or Redux seems like to try to better help people who don't have CS back ground to develop. Anyone who had CS training should be able to state management in plain JS or other general purpose programming language.

Redux was first released more than 5 years ago, it's had more than 3000 commits merged from more than 800 developers, and there have been 69 releases. That's a lot of learning about how to do state management in JS. I would argue that's beyond what an individual developer could ever do. Mobx has similarly large numbers - almost 3000 commits from more than 400 developers. No doubt other popular state libraries also have those sorts of numbers.

If you need a general state management library you'd be crazy to write your own. You might be able to do 90% of what the big, popular libraries have done, but that's just settling for something 10% worse for no good reason. Why give up all that knowledge, testing, and creativity when you can build on top of it? Let other people make the mistakes.

Re: Overmind.js – Frictionless State Management

#23

Hi there and thanks for the feedback on "Why even choose this". Will update the front page! But to answer your question. The main reason Overmind and its predecessor Cerebral ( https://cerebraljs.com/ ) was developed is application insight. The complexity of what we build on the web these days is way beyond the scope of what our brains are able to comprehend. What effects are triggered and what state changes are made…

Have to say, I like the simplicity it offers and clean API.

From a point of view of API design, it looks great.

Re: Overmind.js – Frictionless State Management

#24
post #21

Earlier quoted context omitted.

Lib like this or Redux seems like to try to better help people who don't have CS back ground to develop. Anyone who had CS training should be able to state management in plain JS or other general purpose programming language.

Redux was first released more than 5 years ago, it's had more than 3000 commits merged from more than 800 developers, and there have been 69 releases. That's a lot of learning about how to do state management in JS. I would argue that's beyond what an individual developer could ever do. Mobx has similarly large numbers - almost 3000 commits from more than 400 developers. No doubt other popular state libraries also ha…

The facts are correct, but your conclusion doesn’t follow.

Re: Overmind.js – Frictionless State Management

#25
post #6

If you want a really frictionless state management library for React, please try out my library https://github.com/baron816/use-structure It lets you make state updates using native JavaScript mutation APIs. It uses Proxies to convert those mutable updates to be immutable so that your component updates correctly. This will work: ... const arr = useStructure([]); ... arr.push(1, 2, 3) }>Add value But you could use dee…

So… like immer / use-immer?

It doesn't look like it (from what I gather about `use-immer`). What's being suggested is updating React state via a mutable API on the data value itself. `use-immer` wraps the useState/useReducer functional updaters with a call to immer, whereas `use-structure` suggests mutating the data, which is what every React-beginner instinctively tries to do when they first get started with React. Same idea of using Proxies as immer though.

This is really interesting! Great idea.

Re: Overmind.js – Frictionless State Management

#26
post #21

Earlier quoted context omitted.

Lib like this or Redux seems like to try to better help people who don't have CS back ground to develop. Anyone who had CS training should be able to state management in plain JS or other general purpose programming language.

Redux was first released more than 5 years ago, it's had more than 3000 commits merged from more than 800 developers, and there have been 69 releases. That's a lot of learning about how to do state management in JS. I would argue that's beyond what an individual developer could ever do. Mobx has similarly large numbers - almost 3000 commits from more than 400 developers. No doubt other popular state libraries also ha…

Having more developers, commits and code doesn't mean better software!

In general CS course I took in Uni over 20 years ago, one learns about data structure and state of an application with multiple threads. It is something 'web developer' lacks as web was originally meant to be a document based.

I am not saying developers can't pick that up during their development career, it is just that the bar for being a developer has being simnifically lowered in the last few years. It turned more into a buzz word now days.

Re: Overmind.js – Frictionless State Management

#27
post #21

Earlier quoted context omitted.

Lib like this or Redux seems like to try to better help people who don't have CS back ground to develop. Anyone who had CS training should be able to state management in plain JS or other general purpose programming language.

Redux was first released more than 5 years ago, it's had more than 3000 commits merged from more than 800 developers, and there have been 69 releases. That's a lot of learning about how to do state management in JS. I would argue that's beyond what an individual developer could ever do. Mobx has similarly large numbers - almost 3000 commits from more than 400 developers. No doubt other popular state libraries also ha…

What does the number of commits have to do with anything? That doesn’t imply any kind of quality, right?

Also, have you taken a look at the source code for Redux let’s say? It’s an extremely small library. Not exaggerating, it’s on the order of 1,000 LOC. You don’t think someone could produce that?

I would agree with what you’re saying if you were talking about something like Postgres, which is enormous and complex. These state management libraries are very very simple (I’ve implemented small versions of them many times), and really just encourage a pattern in the code. They’re not operating systems unto themselves.

Re: Overmind.js – Frictionless State Management

#28
post #17

Hi there and thanks for the feedback on "Why even choose this". Will update the front page! But to answer your question. The main reason Overmind and its predecessor Cerebral ( https://cerebraljs.com/ ) was developed is application insight. The complexity of what we build on the web these days is way beyond the scope of what our brains are able to comprehend. What effects are triggered and what state changes are made…

> The third reason is TypeScript. We have all felt the pain of Redux boilerplate and with TypeScript it does not become better. Redux btw, is redundant now; and offers very little value over useContext + useState. And they work wonderfully with TypeScript.

This is definitely not true, especially if you co-locate your data fetching in your reducers, which is a common pattern.

It also provides a single, centralized store instead of needing many context's and lets you abstract data shape/formatting logic away instead of having it in your application.

Context and State are great, but they serve a different purpose than Redux.

Re: Overmind.js – Frictionless State Management

#29
post #16

Earlier quoted context omitted.

Lib like this or Redux seems like to try to better help people who don't have CS back ground to develop. Anyone who had CS training should be able to state management in plain JS or other general purpose programming language.

Just because you can doesn't mean you should. A CS degree doesn't mean you won't reinvent the wheel poorly.

Just to state the obvious: there isn't much to reinvent in a wheel, but certainly it's not a one-size-fits-all kind of object.

That wheel might have been designed by a team of brilliant engineers and built with the latest super materials, but if it's a race car's wheel I wouldn't mount it on a bicycle.

Re: Overmind.js – Frictionless State Management

#30
post #21

Earlier quoted context omitted.

Redux was first released more than 5 years ago, it's had more than 3000 commits merged from more than 800 developers, and there have been 69 releases. That's a lot of learning about how to do state management in JS. I would argue that's beyond what an individual developer could ever do. Mobx has similarly large numbers - almost 3000 commits from more than 400 developers. No doubt other popular state libraries also ha…

Having more developers, commits and code doesn't mean better software! In general CS course I took in Uni over 20 years ago, one learns about data structure and state of an application with multiple threads. It is something 'web developer' lacks as web was originally meant to be a document based. I am not saying developers can't pick that up during their development career, it is just that the bar for being a develop…

It is something 'web developer' lacks as web was originally meant to be a document based.

This is unrelated but it's something that annoys me. Even in Tim Berners-Lee's original memo proposing the web he stated "Hypertext allows documents to be linked into "live" data so that every time the link is followed, the information is retrieved. If one sacrifices portability, it is possible so make following a link fire up a special application, so that diagnostic programs, for example, could be linked directly into the maintenance guide."

The idea that the web could be about more than static documents was there right from the beginning.

[1] https://www.w3.org/History/1989/proposal.html - Live Links section

Post reply on HN