Skip to content

Effects inside components #9

Closed
Closed
@justinwoo

Description

@justinwoo

Is the idea behind the ReactFX effect type that you should only be calling setState and other "non-leaky" effects? I put together an example of using a file input to feed into audio, but of course, it ends up with unsafeCoerceEff everywhere:

https://github.com/justinwoo/react-basic-thing/blob/2bea8435b836f9a202e2df534296b8e8cc09c1d9/src/Main.purs#L36-L55

I'm personally pretty okay with just putting this everywhere to the typical messy React components that are everywhere, but is there some other reason why the effects aren't extensible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions