-
Notifications
You must be signed in to change notification settings - Fork 207
Description
We have a use case where it is not really clear (legacy) whether a url is for a category page or a product page, so first we want to call the url mapping endpoint and then render the list or detail page based on the resource type and id.
We wanted to solve this by getting the url mapping in getProps. Assuming that the getProps would execute before the component.
This seems not to be the case, withReactQuery runs in parallel with withLegacyGetProps. This causes the useProduct hook to execute on the client only and SEO would be hurt.
Solving it in the component also does not work because react-ssr-prepass only does one pass. Understandable, because I can imagine extra passes would not be very performant!?
What I do not understand is, why getProps does not offer me a way to do something before react-query to solve this challenge.
Am I missing something?
We are using PWA kit: 3.14.0