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

defhook macro #27

Closed
lilactown opened this issue Feb 24, 2020 · 1 comment
Closed

defhook macro #27

lilactown opened this issue Feb 24, 2020 · 1 comment
Labels
hooks Having to do with React Hooks

Comments

@lilactown
Copy link
Owner

Create a macro that will define new hooks, applying lint rules for rules of hooks as well as adding the ability to annotate certain behavior with metadata.

(defhook use-thing
  [foo bar]
  ,,,)

This can be a building block towards:

  • Interoping fast refresh to detect changes to custom hooks, in order to hot load them correctly.
  • Warning on using hooks in conditionals, loops.
  • Warning on not filling in deps inside defhook body
  • Add ability to flag an argument as deps to allow warnings about unfilled deps on usage
@lilactown lilactown added the hooks Having to do with React Hooks label Feb 25, 2020
@lilactown
Copy link
Owner Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hooks Having to do with React Hooks
Projects
None yet
Development

No branches or pull requests

1 participant