taion/rrtr

False alarm of deprecation.

Closed this issue · 17 comments

I've replaced react-router with rrtr, both are most recently version, and I got this warning without any code changes:

Warning: [react-router]props.historyandcontext.historyare deprecated. Please usecontext.router. http://tiny.cc/router-contextchanges

A demo repo can be provided later if you need it.

taion commented

Crud, this is probably #15. Do you have a stack trace associated with the warning? How is it getting invoked?

Ye, I think so with #15, here is stack trace:

Warning: [react-router] `props.history` and `context.history` are deprecated. Please use `context.router`. http://tiny.cc/router-contextchangeswarning @ browser.js:49
  routerWarning @ routerWarning.js:31
  get @ deprecateObjectProperties.js:23
  dehydrate @ backend.js:1685
  dehydrate @ backend.js:1685
  dehydrate @ backend.js:1685(anonymous function) @ 
  backend.js:917flush @ 
  backend.js:912(anonymous function) @ 
  backend.js:900

And I just publish a demo at https://github.com/very-geek/univera

Just uncomment https://github.com/very-geek/univera/blob/develop/config%2Fwebpack.babel.js#L33 to reproduce this warning (I temporarily use react-router as a fallback).

taion commented

What specifically would I need to run/do to see that warning?

taion commented

And which browser, too, sorry.

  1. clone https://github.com/very-geek/univera
  2. npm install
  3. npm start && open localhost:3000
  4. uncomment Line 33 in config/webpack.babel.js to use rrtr instead of react-router

then you would see it.

I use chrome dev channel and safari.

taion commented

One last question – which version of the React dev tools are you using?

v0.14.9, I believe the most recent version from chrome store

taion commented

I'm sorry, one final question for real – can you confirm the specific version of Chrome you're on? Is it 51.0.2700.0 dev?

it's ok, my bad, it is version 50.0.2657.0 dev (64-bit)

taion commented

That's very helpful. Thanks, give me a bit to get this properly reproduced.

Thank you, I guess we need an issue template as well 😸

taion commented

This is a bit of a special case. I'm using an advanced feature of proxies, which is apparently only partially supported in Chrome < 51, and only comes up with the dev tools. I don't think this usually comes up, and anyway I was trying to be too clever by half.

Ah I see, let me try on Chrome 51 dev to see what's coming up.

taion commented

It shouldn't, given that I'm not seeing it, but I'm going to revert the change to the deprecation wrapper anyway, since breaking users on the beta and stable channels of Chrome is not really what I want to do.

Yay, that's nice, I'm sick of tweaking here and there on react-router for a long time, really hope rrtr will be the one does everything right, thanks for all your efforts!

taion commented

Fixed on 2.2.1.