News for hackers. Stuff that matters.
Re:Build Yourself a Redux by joshwcomeau on Friday May 05, 2017 @03:17PM (#14276087)
You don't actually have to do this if it bothers you. You can just use the strings inline, but the author (and many of those using Redux) finds it helps to reduce errors, by instantly pointing out typos.

There are also patterns to reduce the import issue. For example, https://github.com/erikras/ducks-modular-redux. I prefer defining my actions with my action creators in one big index, but the point is that there is absolutely a way to mitigate this concern if it bothers you :)

Re:Build Yourself a Redux by fiatjaf on Friday May 05, 2017 @04:06PM (#14276444)
> You can just use the strings inline

Well, that would be much worse, don't you think?

My point was that having to keep identifiers to everything is silly.

Re:Build Yourself a Redux by shriek on Friday May 05, 2017 @06:21PM (#14277234)
The point of keeping identifiers is to show you the intents of an action. If any identifiers seem silly to be added then maybe they don't deserve to be going through reducers in the first place.