DEV Community

Cover image for Some Top React Interview Questions

Some Top React Interview Questions

Sarah Thompson on February 28, 2021

What is react? React is an open-source JavaScript library, not a full-blown framework, and was created by Facebook. Instead of being a f...
Collapse
 
krishan111 profile image
Krishan111 • Edited

Great postπŸ’“.
You can highlight your code by writing the name of language after the three backticks(`).
Eg:- ''' name_of_language
(content)
'''

Collapse
 
salothom profile image
Sarah Thompson

That's super helpful! Thanks!

Collapse
 
iamcoderanddev profile image
Nick Williams • Edited

Thanks it was helpful @salothom & @krishan111

Collapse
 
iamludal profile image
Ludal πŸš€

Thanks for those information !

When you say :

Class Components allow you to execute component lifecycle methods as well as manage a component’s state.

But you can also do it with functional components (useState, useEffect), though there are some small limitations πŸ€”

Collapse
 
alexgeorgiev17 profile image
Alex Georgiev

This is a great post! I can also leave a project which I'm involved in - quizapi.io/

The QuizAPI is a SaaS that lets you test your knowledge on a wide variety of technical topics. You can create your own Quiz or get a random set of questions for a specific topic including Linux, DevOps, BASH, PHP and lots more. We offer an easy to use API which allows you to embed the quiz on your own website.

Please be aware that we're still developing it and we're also expanding the topics and React will be a great new addition to it (we still haven't added any React question quizzes/questions. I would like to announce this in advance so people won't say this is a clickbait).

Cheers for the great article!

Collapse
 
johannchopin profile image
johannchopin

Where did you read that React does server-side rendering?

Collapse
 
ishwarkaushik profile image
Ishwar Kaushik

Wondering the same thing. I thought we may need something like Next to do SSR efficiently.

Collapse
 
iamludal profile image
Ludal πŸš€

React doesn't provide SSR on its own, but as Ishwar said, one can do it using Next.js

Thread Thread
 
maksimmedvedev profile image
MaksimMedvedev

react-dom/server's renderToString() and hydrate() should do the thing I think (with some little thousand-line additional codeπŸ˜‚)

Collapse
 
preacherxp profile image
preacherxp • Edited

Class components are the more complex components. Class Components allow you to execute component >lifecycle methods as well as manage a component’s state.

this is no longer true since React 16.8

Collapse
 
buraksaraloglu profile image
Burak Saraloglu

"OK, virtual dom has quick update feature but how it does even if you have 1k nodes inside of that page?"

One of the questions that I got.

Collapse
 
codehrafn profile image
Hans

Thank you! a good overview of understanding React.js