You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Often, I'll realize right after creating a component that I did it wrong.
Maybe I meant to make a functional component, but forgot the flag. Maybe I realized it has the wrong name (or I typo'ed the name).
Right now the solution is rm -rf src/components/ThingYouJustCreated, which is a little burdensome, and I worry I might make a mistake with that and delete the wrong thing.
I think it'd be neat if you could do:
$ new-component-undo
This will delete the component 'ThingYouJustCreated`. Press enter to continue, or any other key to cancel.
The text was updated successfully, but these errors were encountered:
I was thinking for something like this: new-component undo. What do you think?
Hmm... Yeah, I like that!
The "keyword" is typically the name of the component, but if you wanted to make an undo component, it needs to be capitalized as Undo. So I think a case-sensitive undo command makes sense.
In new-component undo the function of undo is to specify a command. Then I can infer that general syntax for utility is like new-component create Something?
I suggest makeing -u flag as an alternative. Usually when you notice error, you still able to reach that terminal, where you issued command to create component, so you can just type ↑ (or ^P) to bring previous command back and add -u flag yielding something like: new-component Something -u.
That way you can be sure that name is consistent with erroneously created one
Often, I'll realize right after creating a component that I did it wrong.
Maybe I meant to make a functional component, but forgot the flag. Maybe I realized it has the wrong name (or I typo'ed the name).
Right now the solution is
rm -rf src/components/ThingYouJustCreated
, which is a little burdensome, and I worry I might make a mistake with that and delete the wrong thing.I think it'd be neat if you could do:
The text was updated successfully, but these errors were encountered: