This is a Neovim Lua plugin that generates React component files with associated tests.
-
Install Neovim with Lua support.
-
Install Packer, a plugin manager for Neovim.
-
To install with packer add the following line:
use {'rodsnts/component_generator'}
Once the plugin is installed, you can use the :GenerateComponent
command in Neovim to open a text box. Enter the desired component name in the text box and press Enter. The plugin will then generate a .tsx
file with a React component and a corresponding .test.tsx
file with a basic test. The generated files will be placed in the components/{componentName}
directory relative to the current working directory.