DEV Community

Dan Abramov
Dan Abramov

Posted on

React Beginner Question Thread ⚛

Hey folks! My name is Dan, and I work on the React team.

I really like the idea of semi-regular “beginner threads” where people can ask simple questions without getting judged. This seems like a great community so I thought: can we try this here? 🙂

We run a thread like this on Reddit but to be honest I'm finding Reddit hard to use and very impersonal so I don't hang out there much.

The rules are simple:

  1. One question per comment.
  2. The questions have to be about React.
  3. No question is too simple! Seriously, ask away, I don’t bite.
  4. Try to keep questions to a few paragraphs at most. If you need a code sample, put it in a gist or, better, a sandbox.
  5. Please reply to the questions too if you know the answer! I might not be able to reply to all of them although I’ll do my best for this thread.

Note this is an experiment. 😉 I don’t know if enough people here are React users, and if the format is a good fit for this website. If that’s not interesting to you folks that is fine too. Cheers!

Latest comments (244)

Collapse
 
ireir profile image
Irena Irena • Edited

Hello! Why does VSCode add a semicolon at the beginning of line 8? And what does the pair of parentheses at the end of line 10 mean?
Thank you!
codesandbox.io/s/gifted-frost-93xl...

i.imgur.com/JC6mbJ1.png

Collapse
 
olaoyevick profile image
Victor Olaoye

Is it is safe to declare a function component like below? Explain if there is a better approach.

function Example({ someProp }) {
function doSomething() {
console.log(someProp);
}

useEffect(() => {
doSomething();
}, []);
}

Collapse
 
quentin290 profile image
Quentin

Is it possible to modify a web application in react and node.js once react compiled and without the base files?

Collapse
 
iamharnad profile image
Krishna Haranath

Lovely Thread, thanks Dan & Dev Community

Collapse
 
irissiri7 profile image
irissiri7

Hi! Im new to React and have a very basic question:
How do I expand the React Component Tree in Dev tools. I thought there would be a little "arrow" on the left side of the components but there isn't. Thanks in advance and sorry if this question is just too stupid😅

Collapse
 
irissiri7 profile image
irissiri7

Hi!
I'm new to React and I have a very basic question:
How do I expand the React Component Tree in Dev tools??
I thought there would be a little "arrow" for this on the left side of the components but there isn't. Help? Anyone? Thanks in advance and sorry if the question is just too stupid😅

Collapse
 
wierdorohit123 profile image
rohit raut

Hi Dan, First of all i hope that u r safe and doing good. My question is how to decide or breakdown the mockup into different component. To keep it simple how to think in terms of react?.

Collapse
 
shailcode profile image
shail

Hey dan how to write props in practical application

Collapse
 
codeuken profile image
codeuken-io • Edited

Im a new web dev and still trying grasp concepts. My HTML and CSS is very good but I only know a bit of Js.

Right now I am using Statamic Cms. I here a lot of people using js frameworks with Statamic, and I am curious how I can learn to integrate React into my Statamic CMS? Just not sure where to begin.

Collapse
 
dmscn profile image
Leonardo Damasceno

How to style React Components the right way

I'm getting overwhelmed on the many alternatives to style my react components. It's difficult to decide which technology should I use on my new projects.

I know that we can't rely on a single solution and apply it on every project we got. Each one has it pros and cons. So I would like to hear from you how is the process for deciding which one to grab for a new project.