-
Notifications
You must be signed in to change notification settings - Fork 471
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
Refactor: map props to hooks #2564
Conversation
Branch preview✅ Deploy successful! |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried testing one of the wrapped components but get a type error when trying to render(<ExportDialog />)
To make our components more testable, we need to rely less on external hooks and more on props.
To this end, we're introducing a function that maps props to hooks. E.g.:
With this approach, the "dumb"
AddressBookTable
component can be more easily tested w/o having to mock those hooks.