News for hackers. Stuff that matters.
Re:Show HN: List of React state management tools by grassfedcode on Saturday February 24, 2018 @01:37PM (#16454578)
I've been using Stator[0] which uses a global JavaScript object with get(), set(), and connectComponentState() methods that selectively call setState() on components that connect to the global state.

It has worked really well for me on a 5k+ LOC frontend to gdb called gdbgui[1]. It's performant, but perhaps more importantly, it matches my mental model of how the code works (essentially a global setState, can log changes to the console, do type checking, etc.) so I can work more efficiently. Stator was originally part of gdbgui, but since the pattern worked so well for me I extracted it into its own library.

[0] https://github.com/cs01/stator

[1] https://github.com/cs01/gdbgui

Re:Show HN: List of React state management tools by dvddgld on Sunday February 25, 2018 @07:39AM (#16458623)
I like this approach, going to try it out! Thanks for sharing and for releasing good open source software (gdbgui looks great)!