Skip to content

0.4.2: Use server-only package instead of custom environment detection

Compare
Choose a tag to compare
@phryneas phryneas released this 31 Aug 12:41
· 205 commits to main since this release

Previously, we checked for a RSC environment by testing for the presence of the createContext export in the react package.
That didn't work in some edge cases. Instead, now we use the server-only instead to make sure that registerApolloClient is only imported in a React Server Component context.

Thanks a ton to @leonchabbey for contributing this in #90!