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

[DNM] DRAFT - experimental - try strict mode React + Relay hooks #132

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

kmjennison
Copy link
Contributor

@kmjennison kmjennison commented Mar 17, 2021

The ultimate goal of this exploration is to use Relay hooks. This should allow us to more easily use the Relay store correctly; for example, by returning Relay store data from useData, which currently suffers from rendering bugs for top-level pages when the Relay store changes.

If we want to use Relay hooks now, we need to rely on an unstable React Suspense and consequently make sure all code is compatible with React strict mode.

Some of the work this requires:

  • Upgrade to Material UI v5, which should support strict mode
    • We may need to change our styling solution -- see comments in this PR
  • Update Relay dependencies
  • Enable React strict mode
  • Install react@experimental and react-dom@experimental
  • Enable concurrent React
  • Use new Relay features
    • Test using a Relay hook for querying
    • Migrate containers, as needed
    • Migrate mutation logic, as needed

@vercel
Copy link

vercel bot commented Mar 17, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/gladly-team/tab-web/4pFF9isXP6SHQmJHWwyMUTwiqyCE
✅ Preview: https://tab-web-git-kevin-fix-relay-data-gladly-team.vercel.app

@kmjennison kmjennison marked this pull request as draft March 17, 2021 01:40
@codecov
Copy link

codecov bot commented Mar 17, 2021

Codecov Report

Merging #132 (189de55) into master (61876e0) will decrease coverage by 0.16%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #132      +/-   ##
==========================================
- Coverage   89.29%   89.13%   -0.17%     
==========================================
  Files          82       82              
  Lines        1149     1150       +1     
  Branches      268      266       -2     
==========================================
- Hits         1026     1025       -1     
- Misses        110      112       +2     
  Partials       13       13              
Impacted Files Coverage Δ
src/components/ErrorPage.js 100.00% <ø> (ø)
src/pages/_document.js 0.00% <0.00%> (ø)
src/pages/account.js 100.00% <ø> (ø)
src/utils/hooks/useData.js 100.00% <ø> (ø)
src/utils/pageWrappers/withDataSSR.js 100.00% <ø> (ø)
src/components/Achievement.js 93.51% <100.00%> (-0.12%) ⬇️
src/pages/_app.js 92.85% <100.00%> (+0.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61876e0...189de55. Read the comment docs.

@kmjennison kmjennison changed the title DRAFT - experimental - try strict mode React + Relay hooks [DNM] DRAFT - experimental - try strict mode React + Relay hooks Oct 20, 2021
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

Successfully merging this pull request may close these issues.

1 participant