30-seconds-of-code: [FEATURE] 30 seconds of code - React snippets

Created on 10 Sep 2018  路  10Comments  路  Source: 30-seconds/30-seconds-of-code

After some internal discussion and the idea floating around for a bit, I think we should go ahead and brainstorm a bit about adding React snippets in the repository, as a separate page, folder etc.

The idea is to provide a basic cheatsheet for React, much like the base repository, except this will be a sub-project (as it is part of the JS ecosystem and we are probably not going to have snippets in the hundreds in this category). I've started compiling a list of popular StackOverflow questions and answers that might prove useful. Add your suggestions below and let's get a decently-sized list ready for October, when Hacktoberfest starts and we can expect a decent flow of PRs.

My completely incomplete list of ideas

discussion enhancement good first issue help wanted on hold website

Most helpful comment

@fejes713 We can't do private repo on org without paying, plus I wanted this to be a good starting point for Hacktoberfest participation, I will make a new repo and see if I can migrate the issue over to it.

All 10 comments

You should add Modals as they're extremely helpful to have a dynamic modal that closes on click away from the child

Hello! Hope you don't mind me adding to this list :)

  • Spread notation / SO
  • Controlled vs uncontrolled input / SO

Noticed a handful of posts asking about React-Router, would that be something you would want to focus on as well?

Spread notation is something that's well documented and used in few places, but has definate hlepful places(styles are a big one), and controlled versus uncontrolled input is a huge contention point in React, so it'd be smart to touch base on it. It's something I don't really think about myself since the coding guidelines I implemented enforced controlled at my last job(considered a best practice to guard against injection and cross site)

As for organization I think a separate folder or project would be best here. Also to note about Modal is that there are full screen modals based on events, and middle man modals based on parent container. Both would be helpful since I've found more pages struggling with modals.

Update: Having tested subdomain support on Github pages, I have to report we need to move React snippets into their own repo, as it's the only feasible way to host them under react.30secondsofcode.org. Probably a good idea, too, as it will help with separation of concerns. Only issue there is that star count will not be shared, but that's probably alright.

In light of this, I think we should close the issue and go on ahead to create a new repo over the weekend to get started. What do you guys say?

Better idea to me honestly.

30code should stay 30code and provide snippets for vanilla JS only.

30react is a great idea, for the very start, I don't think we need a lot of snippets. Let's keep the focus on quality. If you're up to, we can develop under private repo and then make it public (for the big reveal 馃挴)

@fejes713 We can't do private repo on org without paying, plus I wanted this to be a good starting point for Hacktoberfest participation, I will make a new repo and see if I can migrate the issue over to it.

Idea was to make it under user private repo, but as you said Hacktoberfest is here very soon, so we should give people opportunity to make something great!

This issue was moved to 30-seconds/30-seconds-of-react#1

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for any follow-up tasks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YusofBandar picture YusofBandar  路  5Comments

GrosSacASac picture GrosSacASac  路  3Comments

Priyansh2001here picture Priyansh2001here  路  5Comments

fplgusmao picture fplgusmao  路  4Comments

emelendez picture emelendez  路  4Comments