3 ms·
No, the React team means that they use JavaScript functions as the preferred authoring experience for React components. React components often have side effects
by threatofrain 4y ago
No, the React team means that they use JavaScript functions as the preferred authoring experience for React components. React components often have side effects & internal state and that's not necessarily a bad thing, notwithstanding strict mode.
- manmal 4y agoFunctional programming doesn’t mean no side effects though. At some point, every language/platform has to have them, or it can’t be used for dynamic inputs. React (can) have referential transparency and up to a degree immutability (yes hooks are not side effect free, but so isn’t the IO monad).