Skip to content

Conversation

@diegohaz
Copy link

@diegohaz diegohaz commented Jun 29, 2017

Related to #2482, #1242 and #1886

Generating new Component

Instead of creating component files by hand, you can use generact to generate new components based on existing ones.

Showing generact usage

Optionally, you can add it to devDependencies (yarn add --dev generact) and add an npm script to easily generate new components based on another specific one (e.g. src/components/MySimpleBaseComponent/MySimpleBaseComponent.js):

  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject",
+   "component": "generact src/components/MySimpleBaseComponent/MySimpleBaseComponent.js"
  }

Then, just run yarn component.

@stale
Copy link

stale bot commented Nov 2, 2018

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs.

@stale stale bot added the stale label Nov 2, 2018
@stale
Copy link

stale bot commented Nov 7, 2018

This pull request has been automatically closed because it has not had any recent activity. The conversation will be locked in 7 days unless the pull request is reopened. Thank you for your contribution.

@stale stale bot closed this Nov 7, 2018
@diegohaz diegohaz deleted the patch-1 branch November 7, 2018 23:37
@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants