@nrwl/react:hook
Create a React component using Hooks in a dedicated React project.
Usage
nx generate hook ...
nx g c ... #same
By default, Nx will search for hook
in the default collection provisioned in workspace.json.
You can specify the collection explicitly as follows:
nx g @nrwl/react:hook ...
Show what will be generated without writing to disk:
nx g hook ... --dry-run
Examples
Generate a hook in the mylib
library:
nx g hook my-hook --project=mylib