
Show HN: Generate React components by replicating your own - gracehaz
https://github.com/diegohaz/generact
======
dharness
I am genuinely surprised that people find this improves their productivity by
any significant margin...

~~~
gitgud
All generators have always baffled me in this way. But this might because I'm
always looking at the next shiny thing.

These generators are probably best suited to people with specific repetitive
workflow's, like writing React Components everyday.

------
l5870uoo9y
Would be useful if you could set fixed component path and boilerplate
component and then only run 'generact ComponentName' and with a sub folder
path 'generact Subfolder/ComponentName'. The sell here is really how easy it
is to tailor the boilerplate component to your project.

~~~
qrohlf
I actually built this a few weeks ago:
[https://github.com/qrohlf/bones](https://github.com/qrohlf/bones)

You define boilerplate components in `~/yourproject/.bones` and it does what
you just described. I've been using it in several projects at work, it's been
a nice standardization/productivity bump for my team.

~~~
gitgud
Bones is a great name for a project which uses 'skeleton' templates. Love it!

------
arikfr
This is interesting, but I believe a better solution will be to use something
like hygen[1] to maintain a set of generators for your project.

[1] [https://github.com/jondot/hygen](https://github.com/jondot/hygen)

------
n0us
I used to copy and paste then I invested time and effort into writing some
sublime snippets for components, tests, and such. It was probably the best
time saving investment I have ever made in basically anything.

~~~
gracehaz
I'd done that too. But I found some problems with that approach:

\- you can't automatically create files (AFAIK);

\- it doesn't help your team mates, only works for you and with that specific
editor;

\- if you start working on a different project with different standard, you'll
need to update the snippets or create new ones.

Turned out that I was always copying and pasting, so I decided to create this
tool.

~~~
n0us
True points, very cool tool though and thanks for sharing.

------
swyx
ok so this is a CLI for copy-pasting?

~~~
gracehaz
Kinda, but not really. XD

It copies files, renames them and replaces their names in the contents.

------
scottmf
This looks great. Can’t wait to try it out.

------
senoroink
Bravo for pushing helping people reinvent the wheel less but this just
emphasizes how badly React needs uniformity in the community.

------
Aleena-James
How can a link be placed?

