GithubHelp home page GithubHelp logo

Comments (4)

Reckless-Satoshi avatar Reckless-Satoshi commented on June 15, 2024 1

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 main and then also rebase the-federation-layer since we do not know when the-federation layer will be ready to be merged. However, implementing MobX into both branches might require a bit of a duplicity of work (probably not too much!)

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).

from robosats.

jordanconia avatar jordanconia commented on June 15, 2024

Hello! @Reckless-Satoshi @cdmoss

I'm starting to explore the project. Are you currently managing all the state in AppContext? https://github.com/Reckless-Satoshi/robosats/blob/b585d376b2fb2b658631398e4503f9e9b4567039/frontend/src/contexts/AppContext.ts

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.

from robosats.

Reckless-Satoshi avatar Reckless-Satoshi commented on June 15, 2024

I'm starting to explore the project. Are you currently managing all the state in AppContext? https://github.com/Reckless-Satoshi/robosats/blob/b585d376b2fb2b658631398e4503f9e9b4567039/frontend/src/contexts/AppContext.ts

Sorry for noticing this message so late. Indeed the app state lives in AppContext and most querying is done there as well. While querying itself is a different issue of simply state management that does not trigger unnecesary re-renders, we could also tackle it as a task.

Note, in any case, that we have custom functions for requesting from the coordinator APIs in /src/services/api/ given that, if the frontend is running in the react-native wrapper for Android, then the requests must be done trough the torDaemon

from robosats.

Reckless-Satoshi avatar Reckless-Satoshi commented on June 15, 2024

This task is now once again looking for dev for its reward of 600K Sats

from robosats.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.