Skip to content

event isn't exposed in handler #1

@jschr

Description

@jschr

Hey great little library! I've been implementing some of these ideas into my own project with some slight changes. One of my favourite things so far is being able to deconstruct props/state with default values instead of needing to use getDefaultProps:

export default component(({ props: { count: 0 } }) => {
  return <div>{count}</div>;
});

However I did notice that in your handler wrapper that the original event isn't passed through:

https://github.com/aickin/functional-react/blob/master/index.js#L26

I ended up changing the handler wrapper to pass in e as the 2nd argument but I thought it would be worth mentioning.

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