'in React, is <input value={func(item.foo)} a performance problem?

I may be mixing best practices between React and Angular...

in React, does this incur performance penalties or memory issues?

I know it's not good practice. In Angular it would be the kiss of death.

//assume all the standard boilerplate around this :) 

...
//using redux, react-hook-form 

const fn=(x)=> `${x}-modifying the input value`;

...

return (
  <input value={fn(item.foo)} />   
  //or 
  <input value={()=>fn(item.foo)} />
)



Solution 1:[1]

as irfanullah jan stated, it's not a performance problem in and of itself.

I do feel it should be avoided when possible, especially when working with groups supporting both Angular and React.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Keslavi