Skip to content

Is there a way to integrate Components with cats.effect.Ref? #1071

@chuwy

Description

@chuwy

Sorry if this is a wrong place for questions, but I think even if what I'm asking isn't possible now - it can be a feature request in future.

I'm wondering if there's a way to integrate scalajs-react and cats-effect a step further than replacing CallbackTo[A] with IO[A]. In particular I'm wondering if there's a way to subscribe a component to cats.effect.Ref changes (or fs2.Signal, which is more appropriate)?

To avoid an XY problem - I'd like to use Ref to communicate between neighbour components by passing it as an argument to both of them. Imagine it's similar to what Context does, but I like the API much more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions