Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Unrecognised props - radiumConfigContext, styleKeeperContext #1033

Open
johanarnor opened this issue Oct 21, 2019 · 2 comments
Open

Unrecognised props - radiumConfigContext, styleKeeperContext #1033

johanarnor opened this issue Oct 21, 2019 · 2 comments

Comments

@johanarnor
Copy link

Hi! We've got an issue with v0.26:

Warning: React does not recognize the radiumConfigContext prop on a DOM element. when using Radium with e.g. Link from react-router.

import { Link } from 'react-router-dom'

const RadiumLink = Radium(Link)

I suppose Link simply forwards all props to the underlying a element.

@nathanmarks
Copy link
Contributor

The previous version used the old context API, and the radium class requires access to these contexts inside it's methods, so the class version now uses a hoc to inject the contexts. And the problem is radium extends your class component 😞

If they are only needed in render(), we could possibly get away with using consumer components and render functions as children instead of injecting them via a hoc.

@johanarnor
Copy link
Author

Ah, ok. We've however switched styling lib now, and will unfortunately phase our Radium during the coming months. Should I keep this issue open or close it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants