Skip to content

Instantly share code, notes, and snippets.

@kiraind
Created November 25, 2018 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiraind/261821adfc7291161db1d4b70bd81b67 to your computer and use it in GitHub Desktop.
Save kiraind/261821adfc7291161db1d4b70bd81b67 to your computer and use it in GitHub Desktop.
Create new react component
mkdir "src/components/$1"
echo "import React from 'react'
import './$1.css'
export default class $1 extends React.Component {
render() {
return (
<div className=\"$1\">
</div>
)
}
}" | cat > src/components/$1/$1.js
echo ".$1 {
}" | cat > src/components/$1/$1.css
code -g src/components/$1/$1.js:9:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment