zth / rescript-relay-router

MIT License
16 stars 3 forks source link

Router queries disposed early? #38

Closed zth closed 2 years ago

zth commented 2 years ago
Warning: usePreloadedQuery(): Expected preloadedQuery to not be disposed yet. This is because disposing the query marks it for future garbage collection, and as such query results may no longer be present in the Relay store. In the future, this will become a hard error. 
    at HomeRoot (http://localhost:3000/src/HomeRoot.bs.js:115:24)
    at make (http://localhost:3000/src/routes/Root__HomeRoot_route_renderer.bs.js:53:15)
    at RelayRouter$RouteComponent (http://localhost:3000/node_modules/.vite/deps/rescript-relay-router_src_RelayRouter_bs_js.js?v=119ac42f:217:16)
    at Suspense
    at section
    at div
    at Root (http://localhost:3000/src/Root.bs.js:114:24)
    at make (http://localhost:3000/src/routes/Root_route_renderer.bs.js:54:15)
    at RelayRouter$RouteComponent (http://localhost:3000/node_modules/.vite/deps/rescript-relay-router_src_RelayRouter_bs_js.js?v=119ac42f:217:16)
    at Suspense
    at RelayRouter$RouteRenderer (http://localhost:3000/node_modules/.vite/deps/rescript-relay-router_src_RelayRouter_bs_js.js?v=119ac42f:220:29)
    at ErrorBoundary (http://localhost:3000/node_modules/.vite/deps/@rescript_react_src_RescriptReactErrorBoundary_bs_js.js?v=119ac42f:12:16)
    at Suspense
    at RescriptRelay$Context$Provider (http://localhost:3000/node_modules/.vite/deps/rescript-relay_src_RescriptRelay_bs_js.js?v=119ac42f:2144:27)

Reproducible here: https://github.com/cometkim/rescript-relay-issue-tracker