jaredpalmer/the-platform

Broken with 16.8.0-alpha.0

VinSpee opened this issue · 15 comments

Hi!

As is expected for us bleeding edge-riders, react@16.8.0-alpha.0 breaks this package. I think it has something to do with react-cache, maybe updating it to 2.0.0-alpha.1 would help?

barebones repro: https://codesandbox.io/s/oqy12yrk65

readContext
https://oqy12yrk65.codesandbox.io/node_modules/react-cache/2.0.0-alpha.0/cjs/react-cache.development.js:248:21

Object.read
https://oqy12yrk65.codesandbox.io/node_modules/react-cache/2.0.0-alpha.0/cjs/react-cache.development.js:316:7

Img
https://oqy12yrk65.codesandbox.io/node_modules/the-platform/Img.js:26:15

EDIT: Yeah this is a react / react cache problem. They've updated the react-cache repo, but haven't released the package. see facebook/react#14558

@jaredpalmer any word on this? I tried upgrading the packages in yesterday in a fork, but they were still broke from react-cache. Not sure how to help get this resolved as I can't seem to find any docs around react-cache. 🤷‍♀️

It's affecting all the components.

@caseybaggz there is nothing practical to be done until React-cache releases an update.

@VinSpee they've already released it. 2.0.0-alpha.1 is live.

@caseybaggz
image

2.0.0-alpha.1 was an old release which happened before the currentOwner -> currentDispatcher changes which are causing this issue.

@caseybaggz
image

2.0.0-alpha.1 was an old release which happened before the currentOwner -> currentDispatcher changes which are causing this issue.

Gotcha. My bad. I miss-interpreted your original message. 👍

A similar issue exists with react@16.8.1. My ecomm project is all kinds of broken right now.

Hope we can get a new update of the react-cache soon...

the master branch already contains the fix. @jaredpalmer can we have an npm release plz?

0.10.0 released 🎉

thx @jaredpalmer

yay!

does this now require vendoring react-cache?

i think not vendoring but just adding it to the package.json on your own

31a119f

https://codesandbox.io/s/o7mk6p274y

example codesandbox is still complaining about dispatcher

true... adding react-cache@^2.0.0-alpha.1 does not solve the issue

figured things out finally: since react-cache does not have a published package compatible with react 16.8+ you have to build it from master and vendor it. this is exactly what was done in the-platform so you can just grab it from https://github.com/palmerhq/the-platform/tree/c1d20b31a49ab5df01f21448e2e6129ffd51a57e/example/vendor/react-cache