r/reactjs • u/timmonsjg • Dec 03 '18
Needs Help Beginner's Thread / Easy Questions (December 2018)
Happy December! โ๏ธ
New month means a new thread ๐ - November and October here.
Got questions about React or anything else in its ecosystem? Stuck making progress on your app? Ask away! Weโre a friendly bunch. No question is too simple. ๐ค
๐ Want Help with your Code? ๐
- Improve your chances by putting a minimal example to either JSFiddle or Code Sandbox. Describe what you want it to do, and things you've tried. Don't just post big blocks of code!
- Pay it forward! Answer questions even if there is already an answer - multiple perspectives can be very helpful to beginners. Also there's no quicker way to learn than being wrong on the Internet.
Have a question regarding code / repository organization?
It's most likely answered within this tweet.
New to React?
๐ Here are great, free resources! ๐
38
Upvotes
View all comments
Show parent comment
1
u/timmonsjg Dec 05 '18
This is touched on in one of Dan Abramov's latest blog posts.
Specifically -
So, yes there is some behinds the scene work React does to assign props to the class instance.
It doesn't need to be that way at all. You can pass a reference to the function or an arrow function returning the onclick in either circumstance.