Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Dispatching actions is not type safe #71

Copy link
Copy link
@arthurxavierx

Description

@arthurxavierx
Issue body actions

The current definition of Self allows for actions of any type to be dispatched in some cases, what may cause runtime errors:

type Self props state action =
  { props     :: props
  , state     :: state
  , instance_ :: ReactComponentInstance
  }

This happens because action does not exist in the body of Self. A possible solution is to either newtype it (breaking change), or change it to:

type Self props state action =
  { props     :: props
  , state     :: state
  , instance_ :: ReactComponentInstance
  , action  :: Proxy action
  }
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.