Now multiply this by a number of possible updates of the state per second and you’ll see how much computations the app will do without SCU optimization. This might have a big impact on performance in applications with frequent user interactions and lots of state changes per a single interaction. Or for example in a stream based app, like WebSockets, where you need to continuously display some amount of incoming data. Ideally you would want to divide your app into sub-trees of components, so each sub-tree will have its own root component, with SCU check, connected to application state. And also supply that check for purely presentational components, using which you basically construct your UI, but this also depends on the size of the app and may not be necessary in a small applications.
Hi. If in a reasonably large app with many updates all SCU checks are always returning true it…
Roman Liutikov
31
Thank you! I thought these were the consequences but wasn’t sure. I appreciate the write-up, it’s very useful.