Skip to content
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

Functional components can't be specced #8

Closed
lilactown opened this issue Nov 5, 2018 · 1 comment
Closed

Functional components can't be specced #8

lilactown opened this issue Nov 5, 2018 · 1 comment

Comments

@lilactown
Copy link
Collaborator

Because functional components are expected to take in a JavaScript object as props, and return a React Element, it is not currently possible to write a spec for them.

@lilactown
Copy link
Collaborator Author

c5fccda adds support for pre- and post-conditions in the defnc macro.

I think that this adequately satisfies most uses of speccing React components.

One enhancement might be to enable/disable pre/post checks based on goog.DEBUG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant