Closed Hamzah-Ahmad closed 1 month ago
Hi @Hamzah-Ahmad !
Thanks for the contribution, however returning JSX in hooks is generally not a good idea since hooks should be UI agnostic.
Some libraries like Material UI does this because they provide tightly coupled components, but it's a completely different approach from this project.
A UI agnostic version of this hook is welcomed, let me know if you have questions.
Thank you for the getting back to me. I understand. The modal was completely custom built using simple React and CSS (0 dependencies). I'm not sure if that counts as UI agnostic. Thanks either ways.
The
getHooks
hook is looking for files with the.ts
extension. I am working on auseConfirm
hook to allows to easily prompt for confirmation from the user. The hook returns a modal component, and thus I need to mark the file with thetsx
extension.( If returning JSX from a custom hook is considered bad practice, please let know)