Better HN
topnewbestaskshowjobs
Log inSign up

gracehaz

24 karma · joined Apr 9, 2018 (8y ago) · 13 submissions

Submissions

1.

Introducing the Single Element Pattern(medium.freecodecamp.org ↗)

1 points · by gracehaz · 8y ago · discuss

2.

Show HN: Single Element Pattern for React(github.com ↗)

2 points · by gracehaz · 8y ago · discuss

3.

React's new context API: Toggle between local and global state(medium.freecodecamp.org ↗)

3 points · by gracehaz · 8y ago · discuss

4.

React's new context API: Toggle between local and global state(medium.freecodecamp.org ↗)

2 points · by gracehaz · 8y ago · discuss

comment 8y ago · link · parent

This can be easily done by creating a npm script "generact path/to/boilerplate/component.js" and just running `npm run generact`.

The difference though is that you'll still be prompted for component path and name, but I'd gladly accept a PR adding options to CLI (maybe --path, --name?) to skip that part.

comment 8y ago · link · parent

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.

comment 8y ago · link · parent

Kinda, but not really. XD

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

8.

Show HN: Generate React components by replicating your own(github.com ↗)

38 points · by gracehaz · 8y ago · 15 comments

comment 8y ago · link · parent

Components relying on <State context> will be re-rendered with new state.

10.

Show HN: 2kB React state management library using the new Context API(github.com ↗)

10 points · by gracehaz · 8y ago · 2 comments