-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to test higher order components? #297
Labels
Comments
Here const Wrapper = () => (story());
{Formous()(Wrapper)} |
Great, thanks! I'll give that a try. |
I am closing this now. But feel free to reopen. |
This is what wound up working for me: storiesOf('Formous', module)
.add('basic', () => {
const Example = ({ fields, formSubmit }) => {
return <div>
<form onSubmit={formSubmit(action('form submit'))}>
<input type="text" { ...fields.name.events } />
<input type="submit" />
</form>
</div>
};
const Wrapped = Formous(options)(Example);
return <Wrapped />
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to use Storybook to quickly test a package of mine, which is a higher-order component:
That's not going so well :) Two questions:
The text was updated successfully, but these errors were encountered: