React-responsive-carousel: [SOLVED] ES6 problem type is invalid

Created on 29 Mar 2017  路  6Comments  路  Source: leandrowd/react-responsive-carousel

Hi, i have a prolbem with your component, when i use it :
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.

Most helpful comment

Are you importing { Carousel } from "react-responsive-carousel" ?

All 6 comments

Are you importing { Carousel } from "react-responsive-carousel" ?

Yeah and i try it with minimal option like this for example :

import { Carousel } from 'react-responsive-carousel'

render () {
    return (
        <Carousel>
             <div>hello</div>
             <div>wolrd</div>
        </Carousel>
   )

but not working ^^ the error :

  • TypeError: Cannot read property 'length' of undefined
  • Uncaught (in promise) TypeError: redirectLocation is not a function
  • Uncaught TypeError: Cannot read property '__reactInternalInstance$pcr31vz8nl' of null

edit: Problem solved, i try with img balise and it working ! Just last time i did not import the right way with the { }

Good to know. Can I close this issue then?

You can use showThumbs=false if you don't want use images.

Yeah close :) is good thanks :p

Cheers

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sinaler picture sinaler  路  3Comments

sprlwrksAprilmintacpineda picture sprlwrksAprilmintacpineda  路  6Comments

anoush-soghomonyan picture anoush-soghomonyan  路  6Comments

spk-cpsamut picture spk-cpsamut  路  4Comments

ajmas picture ajmas  路  5Comments