Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Function Declaration in React Hook #799

Open
ghost opened this issue Mar 21, 2020 · 0 comments
Open

Function Declaration in React Hook #799

ghost opened this issue Mar 21, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 21, 2020

I am Bit confused when developing app using react hook is where to put function declaration either inside the component or outside. Some argue that if you have dependency then put it inside component otherwise outside. But if we see useReducer our reducer is outside the component.
i just want good practice about that. what in your mind when declare function mean how you decide.

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

No branches or pull requests

0 participants