-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Current frontend state-management is a little clunky, a switch from React Context/Reducer to MobX may be worth it #456
Comments
Hey @cdmoss thank you for proposing this change! Indeed, useContext is becoming untamable and will be hard to maintain as complexity increases. Let's make the switch to MobX as state management a rewarded task with 600K Sats ⚡ bounty. The federation layer adds a Exchange and Coordinator models/classes and routines to cycle through every coordinator API and aggregate. Ideally we should be able to implement MobX on Once MobX is in place, it will be much easier to build a proper Robot Garage (many robots and many orders that updated in the background rather than a simple list of robot that are not really alive). |
Hello! @Reckless-Satoshi @cdmoss I'm starting to explore the project. Are you currently managing all the state in It seems that the state manager's main purpose is syncing an external state with the app. Therefore, I recommend using TanStack Query for this scenario since it will reduce much of the boilerplate. |
Sorry for noticing this message so late. Indeed the app state lives in A Note, in any case, that we have custom functions for requesting from the coordinator APIs in |
This task is now once again looking for dev for its reward of 600K Sats |
Hi @Reckless-Satoshi ... I can take a shot on this |
Hi @Reckless-Satoshi, I have knowledge of React and some experience i want to work on this issue and use my skills to solve it can you assign it to me |
Hey @ronyevernaes and @MrBlackGhostt , |
Hey @Reckless-Satoshi , I have good experience working with react and Built great Projects till now . Can I Take this issue up ?? |
@KoalaSat @Reckless-Satoshi can you assign me this issue ?? |
Problem
Global and semi-global frontend state is orchestrated by React Context/Reducer, which causes necessary full tree rerenders that degrade app performance and makes the state management code less readable. These problems will only get worse as robosats extends its functionality (e.g. federation, PRO)
Proposed Solution
Switch to MobX, a popular, simple-to-use observer based library that allows for much more precise state-driven rerenders.
The text was updated successfully, but these errors were encountered: