hasura / learn-graphql

Real world GraphQL tutorials for frontend developers with deadlines!
https://hasura.io/learn/
MIT License
1.2k stars 651 forks source link

Update the way of creating Apollo client in React #1040

Open leeziwong opened 4 months ago

leeziwong commented 4 months ago

Description

The previous way uses the "useState" hook conditionally, which violates the rules for using React hooks.

Related Issues

Do I have to raise an issue for this PR?

Solution and Design

Steps to test and verify

Limitations, known bugs & workarounds