trembacz/react-scroll-to-element

Uncaught Error: Element type is invalid:

Closed this issue · 1 comments

Hi I am getting following error

  renderItems(items){
    return _.map(items, (val, key) => {
       const imgUrl = require(`../../../images/${val.image}`)
      return (
        <ScrollTo type="id" className="jumbtoSection" element={_.kebabCase(val.Name)} key={val.id} offset={100} timeout={3000}>
          <img src={imgUrl} />
          <span>{val.Name}</span>
        </ScrollTo>
      );
    });
  }

Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Children should be wrap in a div