rafgraph / react-interactive

Better hover, active and focus states than CSS pseudo-classes, and a callback when the interactive state changes.
https://react-interactive.rafgraph.dev
MIT License
167 stars 8 forks source link

Invalid prop `as` supplied #11

Closed dsantoro-ipkeys closed 5 years ago

dsantoro-ipkeys commented 5 years ago

I updated to 0.9.0 from 0.8.3 and received this error: Warning: Failed prop type: Invalid prop `as` supplied to `Interactive`.

Example usage from my code:

import { Link } from 'react-router-dom';
import Interactive from 'react-interactive';
import s from '../../styles/app.style';

<Interactive 
    as={Link}
    to={url || `/portal/${this.props.type}/${card.gsx$name}`}
    {...s.link}
    >
    [...]
</Interactive>

Downgrading to 0.8.3 resolves this issue. Let me know any other information I can provide to assist you.

rafgraph commented 5 years ago

Thanks for the heads up, I released version 0.9.1 which fixes this.