Skip to main content

All Questions

0 votes
3 answers
2k views

Are helper functions defined inside a React component re-evaluated every time the component is used?

Say I have a React component that looks like this: const MyReactComponent = (props) => { const my_function = () => {// do some stuff...} return ( <div> <p> ...
Asker's user avatar
  • 1,735
1 vote
3 answers
6k views

Generate Hash fron an Object

In my React app, I am currently thinking of ways to optimise performance. Having read about lazy evaluation, I wonder whether its possible to generate a unique hash code based on the current content ...
Kayote's user avatar
  • 15.7k