FormidableLabs / radium

A toolchain for React component styling.
http://formidable.com/open-source/radium/
MIT License
7.39k stars 308 forks source link

Unrecognised props - radiumConfigContext, styleKeeperContext #1033

Open johanarnor opened 5 years ago

johanarnor commented 5 years ago

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 commented 4 years ago

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 commented 4 years ago

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?