Closed alansouzati closed 5 years ago
The same question, hoping a quick fix.
I have the same issue with acorn getting updated to version 6
This was not a public API and won't be fixed; The context was using React's old context API and has been switched over to the new one.
Arguably this is not a breaking change as the context was meant to be accessed via the withLive
hoc: https://github.com/FormidableLabs/react-live/blob/master/src/hoc/withLive.js
I would like to propose that you at least export LiveContext in your index.js. I'm going to send a PR for that just in case.
That'd make sense :+1: Cheers!
I understand the rationale behind the release now. Sorry, I did not realize that your context was not a public API.
Let me work on the PR for the LiveContext
By following the semantic versioning, I was under the expectation that updating from 1.11.0 would not break my app, but it did.
I was using the context to access the
error
insidelive
and this has been removed. The built inLiveError
does not work for me since I want to control how to render it.Now you are using the new react context API, which is great but you are not exposing this context for the outside world, making it impossible to access the error and customize it.
I would like to propose that you at least export
LiveContext
in yourindex.js
. I'm going to send a PR for that just in case.In the meantime, I will downgrade to 1.11.0 and pin to it.
On a related note, I'm facing problems with buble and acorn. They are configuring acorn as an external, and this is also breaking my react-live integration. Buble seems to be relying on acorn version 6, but webpack and other libraries are still using version 5. Since it is being configured as an external, it will not use the built in one. I sent a PR for them too:
https://github.com/Rich-Harris/buble/pull/160