I searched around for a simple tool like this and could not find one so… I wrote my own, and now I am a published NPM coder!
Updated to version 2.0.0 which is compatable with the removal of PropTypes from react. If your project uses ‘prop-types’, the current syntax is correct. If you’re not using them (which is not best practice), just delete the line.
Also includes default blank state object just waiting for your data!
Currently in version 1.1.1, with this command line tool, you can create new component files quickly in ES6 (or optionally ES5) including the bare necessities of importing react files, and rendering your main
In version 1.1.0 I added the ability to create a CSS file alongside the component file, according to the methodology recommended by Andrew Farmer.
I used this on my own projects and it saved me all the tedious typing involved in creating new component files and also prevented the introduction of typos.
Here is the live 1 page app I created with his tutorial and using Trot.
You don’t have to follow his system to use Trot, but for the CSS options, it helps to understand his system (if someone knows if this is a ‘standard’ basic approach to CSS/React I’d like to link to the original resource. Still learning.
it is on version 0.0.2 and will likely need a lot of initial patches before it’s “prime time ready”. but if you are an FCC camper learning or writing react, please consider helping me improve this package.
The first thing on my -todo list is to add ES6 syntax as well, I’ll do that this evening most likely.
I welcome any and all feedback on improvements to my code, features you’d like to see, suggestions on adding flag options, etc.