Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to pass additional data to resolveData #631

Open
mkilpatrick opened this issue Sep 25, 2024 · 0 comments
Open

Ability to pass additional data to resolveData #631

mkilpatrick opened this issue Sep 25, 2024 · 0 comments

Comments

@mkilpatrick
Copy link
Contributor

When you have a prop that influences a second prop, resolveData is the way to handle this. Unfortunately, since resolveData is a function and not a component, you cannot use a useHook inside of it. If the data you're using originates from a useHook there isn't a great way to handle prop2 changing based on prop1.

As an example, I have an object coming from a Provider/hook where I want to do something like:
prop1 is set to x
prop2 should be updated to the value of myObjectFromContext[x]

I'm not sure if there's an alternative way to do this or even if being able to pass additional data to resolveData would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant