You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Why]:The advantage of calling the render prop as a function instead of as a component with React.createElement is that the consumer can compose methods inline using anonymous arrow functions without triggering an unmount/mount each time.
#7392
Open
Mori-Young opened this issue
Dec 30, 2024
· 0 comments
> The advantage of calling the render prop as a function instead of as a component with React.createElement is that the consumer can compose methods inline using anonymous arrow functions without triggering an unmount/mount each time. This is because React uses the function/class name to determine whether a node could be reused.
Hello, I am a newbie and recently came into contact with render prop. I have a question for you: How to define re-rendering? I tried to print in the Inline of <RenderWithFoo render={Inline} />, and it was also executed during re-rendering. My definition of re-rendering is that React will execute the function component and reconstruct a new virtual node struct.
The text was updated successfully, but these errors were encountered:
Mori-Young
changed the title
> The advantage of calling the render prop as a function instead of as a component with React.createElement is that the consumer can compose methods inline using anonymous arrow functions without triggering an unmount/mount each time. This is because React uses the function/class name to determine whether a node could be reused.
[Why]:The advantage of calling the render prop as a function instead of as a component with React.createElement is that the consumer can compose methods inline using anonymous arrow functions without triggering an unmount/mount each time.
Dec 30, 2024
@alexkrolick
Hello, I am a newbie and recently came into contact with render prop. I have a question for you: How to define re-rendering? I tried to print in the
Inline
of<RenderWithFoo render={Inline} />
, and it was also executed during re-rendering. My definition of re-rendering is that React will execute the function component and reconstruct a new virtual node struct.Originally posted by @Ys-OoO in #1241 (comment)
The text was updated successfully, but these errors were encountered: