Skip to content
This repository has been archived by the owner on Jul 9, 2022. It is now read-only.

find a solution to share information from graphql to mdx #7

Closed
axe312ger opened this issue Dec 12, 2019 · 2 comments
Closed

find a solution to share information from graphql to mdx #7

axe312ger opened this issue Dec 12, 2019 · 2 comments

Comments

@axe312ger
Copy link
Collaborator

the context and reducer approach at the moment is problematic for SSR.

we might go for a simple map object for now, keeping the hook names to avoid breaking the api

@axe312ger
Copy link
Collaborator Author

There is actually no need to add data later on. Gatsby is very page centric, so one query per page as gatsby suggest is the best solution. All available images are then passed to mdx with a simple context without reducer.

@axe312ger
Copy link
Collaborator Author

Ahh: The solution was to simply use React.createContext

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

No branches or pull requests

1 participant