Skip to content

digital-wafa/react-generator

Repository files navigation

wafa react generator config

react-generator npm version

A shared react components generator to use in digital wafa projects


Installing

npm i -g @digital-wafa/react-generator

Generate a reusable component

rg-component

Configuration

Create a react-generator-config.js at the root of your project to override default config.

Default configuration

module.exports = {
  projectName: 'default',
  typescript: true
};

This generator allows to create two kind of React components (Smart & Dump)

Component folder structure :

index.{ts|js}
<Component name>.module.css
<Component name>.test.js
<Component name>.{tsx|jsx}

Container folder structure :

index.{ts|js}
<Component name>.module.css
<Component name>.slice.{ts|js}
<Component name>.saga.{ts|js}
<Component name>.{tsx|jsx}
Tests/<Component name>.test.js