I have minimum date and maximum date control on more than one page on the yup side. My login service returns processDate: 12.26.2020 response and I want to pass the processDate parameter instead of using new Date() to all controls. How should I go? I am using context for state management.
Asked
Active
Viewed 157 times
1 Answers
0
I think you need more code to get a more specific answer, there are a few patterns you could use:
- Use getState/setState in parent instead of passing it down - best
- Use a utility function in the components to convert the string, to prevent passing down Date()
- Use something like Redex to manage state
Sounds like the issue is more prop passing than anything else?

Jon Jones
- 1,014
- 1
- 9
- 17