Components

Custom (and multiple) components are better or worse than native ones?

Custom (and multiple) components are better or worse than native ones?
  1. Which is better class component or functional component in React Native?
  2. Why functional components are better?
  3. In which of the following cases should you use higher-order components?

Which is better class component or functional component in React Native?

Class components are used as container components to handle state management and wrap child components. Functional components generally are just used for display purposes - these components call functions from parent components to handle user interactions or state updates.

Why functional components are better?

Easier to test: You don't have to worry about hidden state and there aren't as many side effects when it comes to functional components, so for every input, the functions will have exactly one output.

In which of the following cases should you use higher-order components?

We use higher order components to primarily reuse logic in React apps. However, they have to render some UI. Hence, HOCs are inconvenient when you want to share some non-visual logic. In such a case, React hooks seem to be a perfect mechanism for code reuse.

What is alternative way to show information without tooltip on mobile? [duplicate]
What can I use instead of a tooltip?Are there tooltips on mobile?When should you not use tooltip? What can I use instead of a tooltip?You can use mo...
Is dragging the mouse with a button pressed not controversial at all?
Does drag clicking damage your mouse?Can a mouse be used for dragging?What is dragging with a mouse?What is the difference between clicking and dragg...
Translating list with checkboxes, to a combo of dropdowns
How do I select multiple options from a drop down list in a checkbox? How do I select multiple options from a drop down list in a checkbox?But in th...