React life cycle methods (functional components) [closed] - reactjs

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 months ago.
Improve this question
I'm a newbie to react.js and i don't know class components.I'm trying hard to understand the react life cycle.

If you need info on React life cycle methods for class components, check here: https://reactjs.org/docs/state-and-lifecycle.html
If you need info on React functional components check here: https://reactjs.org/docs/hooks-overview.html

Related

Changing className after a component has rendered [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 days ago.
Improve this question
I'm using TypeScript, React in VS.
Trying to change a component's className to play with style and hide stuff. I don't want all script in one file to keep things clean.
This is the link to CodeSandbox https://codesandbox.io/s/quizzical-hill-6elcos

How to make a Splide js Gallery carousel in React js? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 days ago.
Improve this question
How to make a Splide js gallery carousel in React js or Next js? there's not much guidance in the official documentation
Please give me a sample code or any resource on the internet if you know, i've done doing a lot research on the internet
You can use Swiper.js , It has good documentation and used frequently between react developers.
https://swiperjs.com/

How many hooks is it advisable to create per class? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 months ago.
Improve this question
Is there a number for it? Has anyone experienced concurrency issues?
Thanks in advance.
you cant create hooks in class based comp , only in functional components.
Also there's no such issue as how many hooks to be created in functions. it depends on your code how much re rendering is those causing if youre using useState

What should I use to pass data to other component. React Hooks or Context API or Redux or prop drilling. Which one will be better for performance [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 10 months ago.
Improve this question
I can pass data to other REACT component using React Hooks, Context API and Prop Drilling. Would it be wise to learn about Redux to manage my state as well as use it to pass my data to other component performance wise.
That actually depends on your use case. With hooks, context API you can achieve almost anything

Is the class component of React JS going to obsolete? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed last year.
Improve this question
I am aware that React’s official documentation states that there's no plan to deprecate class components any time soon. But, according to some website and article, the class components are going to obsolete.
There is no plans to remove class components. Library developers recommend use functional components in new code.
You can write functional or class components if you can keep code clean and easy to understand for any develop.

Resources