DEV Community

Discussion on: React: Class Component VS Function Component with Hooks

Collapse
 
scsskid profile image
scsskid

Im also new to react, so take it with a grain of salt:

You create a custom Hook in a separate file, which you can import then, this is your childComponent, as long as you follow the naming Schema (use*), state props should propagate automatically