if my HOC is setting state ,do I need to change my Container component to always assume that a function is being passed in for getdata and updatedata?
I have a Container Component that I want to make more reusable, I've refactored my code as much as possible, but I have two parts of the component that I want to be able to change dynamically, which I think a HOC will help
The two parts are a function to get data and a function to update data
From what I understand from reading the docs I can use a HOC to wrap the component and pass in functions that can be reused
My question is, if my HOC is setting state but my container component is also setting state, do I need to change my Container component to always assume that a function is being passed in for getdata and updatedata?
The two parts are a function to get data and a function to update data
From what I understand from reading the docs I can use a HOC to wrap the component and pass in functions that can be reused
My question is, if my HOC is setting state but my container component is also setting state, do I need to change my Container component to always assume that a function is being passed in for getdata and updatedata?
No any search results
You already invited:
2 Answers
Ali
Upvotes from:
Carter
Upvotes from: