Skip to content

first class classes #8

Open
Open
@joelburget

Description

@joelburget

It's currently impossible to render a class from a ReactT. This should be possible with locally or something.

In the best of all worlds you could do something like:

div_ $ do
    someClass
    span_ "this is not a class"

There are a few problems though...

  • someClass is not ReactT so we can't use do notation here. Okay, we could use RebindableSyntax to make this possible, but I think that's a bad idea. Instead, why not extend locally to take either a ReactT or a ReactClass.
  • The meaning of a class is not super clear. In the current formulation it's where state is stored in an IORef, but that's an implementation detail, not a means of abstraction. Maybe we don't need classes. Maybe we can figure out a clearer meaning for them. createClass also feels really weird. It's stateful in an unclear way and lives in the IO monad.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions