cpunion / react-actioncable-provider

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New context API

rafaelklaessen opened this issue · comments

React v16.3 introduces a new context API that replaces the original context API used in this package.

Could you implement this new context API?
If not, this package will not work with React v17.

I'll take a stab at this. I've recently had to implement the new context API in one of my projects, so I'm reasonably confident I can do that same thing here.

I've got it implemented and working, but I need to add some tests. Once I've done that, I'll push to my fork and open a pull request.

  • react-actioncable-provider: 2.0.0
  • react: ^16.6.1

I'm having issues that seem related to this in IE 11. Curious what you think. What would you recommend?

Unexpected identifier error on line in react-actioncable-provider
var { Provider, Consumer } = React.createContext()

Unexpected identifier error on line in react-actioncable-provider
var { Provider, Consumer } = React.createContext()

IE doesn't support object destructuring. Are you transpiling your project's code targeting IE 11?

Hmm thanks it seems not, even though I included transform-object-rest-spread and transform-es2015-destructuring. Thanks for your quick help @mgoggin