0

I know that setting "display none" instead of not rendering is kinda against React philosophy - still I have to ask:

Isn't that the proper way if my View is actually a expensive component?

In my case a react-native-charts-wrapper chart with almost 20k data points.

There are 3 charts and only one of them is showing each time (I can't reuse the same chart because they are different types - e.g. LineChart vs BarChart).

Hugo
  • 2,569
  • 1
  • 19
  • 18
  • 1
    Possible duplicate of [Compare the performance between hiding React components with css and state management](https://stackoverflow.com/questions/50303162/compare-the-performance-between-hiding-react-components-with-css-and-state-manag) – Roy Wang Jun 12 '18 at 12:22
  • Can't you use same method to return which chart to render using if...else – Kranthi Jun 12 '18 at 13:51

0 Answers0