Code Monkey home page Code Monkey logo

Comments (4)

StevenTCramer avatar StevenTCramer commented on August 17, 2024

@cveld Singleton vs Scoped. Singleton on the server-side would be Global for all clients. So if State were a Singleton then it would be shared amongst all users.

If subscriptions were a singleton they wouldn't make sense. Telling client A StateHasChanged on a component that was rendered on Client B wouldn't make sense.

But your handlers can take a dependency on a Singleton. Let me know a bit more about what you are trying to do and I can try and help.

from blazor-state.

cveld avatar cveld commented on August 17, 2024

from blazor-state.

StevenTCramer avatar StevenTCramer commented on August 17, 2024

interesting. Let me see if I understand.

ClientA has some StateX, ClientB also has the same StateX . You want ClientB to be updated when ClientA changes StateX?

Your components that display the StateX would be subscribed to that local state. So if your SignalR Hub is sending Actions to the client UpdateStateX for example then when the handler processes the Action the components would update.

But I don't think I am understanding your goal.

Please add me to Discord and lets chat. StevenTCramer#9010

from blazor-state.

StevenTCramer avatar StevenTCramer commented on August 17, 2024

We discussed on Discord some time ago. So am going to close this. Thanks.

from blazor-state.

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.