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

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

Related

react styled-components VS emotion [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 3 days ago.
Improve this question
You are about to select a style module during the new project.
The two ways of using them seem almost the same.
Which one does it look good to choose?
Project wants to do stack overflow clone coding
awdawdawdasdadawdaqwda

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.

which way is better when using SVG [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 1 year ago.
Improve this question
I am developing a website using React and I have almost 40 SVG, so which way is better to use them
1-<img src="./name.svg"/>
2- create component for every one and import them
thank you`
Create a new component for each one and import them. That way you can reuse them in other parts of your app as a react component and not an img tag. But in essense, it doesnt really matter

is code sharing between react and react native possible? [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 5 years ago.
Improve this question
I want to know whether, is it possible to create an app which works both on web and mobile app with same code. I think it is possible in angular 2 ionic. But, I'm not sure about react. Can anyone help me on this?
Thanks in advance!
Yes, it is possible, with help with react-web or react-native-web. But I wouldn't recommend these.

Would React be suitable for building a chat site like Slack or Hipchat? [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 years ago.
Improve this question
I've recently started learning React and don't know enough to make a judgement on whether it would be a good library to use for a chat web app?
HipChat is built with React: https://developer.atlassian.com/blog/2015/02/rebuilding-hipchat-with-react/
I believe it also uses Material-UI since some of the components are near identical (buttons, icon/label placement, etc.)

Resources