DEV Community

loading...

Discussion on: Compute values on component mount with React Hooks: State vs Ref

Collapse
raicuparta profile image
Ricardo Author

I already mentioned that solution in the article. My solution will do an extra render, yes. But that's a good thing here, because the component won't be blocked from rendering while the value is being computed.