Save the blog for the future and CRACK any interview in the WORLD.
Under the Hood
I’ve given more than 100 interviews in my 4 years of ...
For further actions, you may consider blocking this person and/or reporting abuse
I was recently asked: "What are the Container component and Presentational component?" And it threw me for a bit of a loop - because in my experience, hardly anyone in the React community uses this terminology anymore. In fact, it can even be thought of as deprecated.
Don't take my word for it. Dan Abramov himself states as much in the top of this article:
medium.com/@dan_abramov/smart-and-...
That was in 2019.
Now in some circles there is a practice of separating pure and effects components to decouple presentation from effects.
Cognitive Loads in Programming
Pure vs impure (or, as you put it, pure vs effects) is not the same dichotomy as container vs presentation.
See this discussion.
Both suggest that at times component-centric can be too lumpy.
I think Dan Abramov was getting frustrated that the approach was being mindlessly applied without a priori assessment of the trade offs.
Again it hardly matters, I don't think so we write code with 2 components in mind whether it's presentational or container we just write when we want to write that's it.
Looks like with React Server Components it's been reincarnated as “Presentational and Data Components”.
Yeah, it's a bit of deprecated and if anyone ask me these questions I simply say the truth even if I don't knew the answer
Recently, I had an interview for frontend position. I would say that I was asked around 80% and above of these. Nicely listed!!
Glad to hear that !!!!
Question, do interviewers ask algorithm questions as well?
Great post by the way. Will definitely come in handy.
Yes they do, but basic ones not really in-depth DSA
okay, thank you.
Thanks for sharing
Thanks for reading and the comment !!!
The title is a little misleading…
In what sense?
Because the title says FRONTEND questions but it's all REACT questions :)
So for me it's misleading.
Well not really, in 2023 frontend development means React is a must.
I've added Javascript questions also, including map, filter, promises, async-await, closures and so on and only those things are asked when it comes to javascript.
Rest, React is imperative so most of the things will revolve around React and that comes under Frontend development itself.