react-swipeable-views: Updating the version from 0.13.3 to 0.13.5 caused the error in console

Updating the version from 0.13.3 to 0.13.5 caused the below error in console:

index.js:1 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.

react-dom.development.js:26629 Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Everything should be working fine after version update.

Current Behavior

There is a JS error and code is break.

Steps to Reproduce (for bugs)

  1. Update the version from 0.13.3 to 0.13.5
  2. Run the application
  3. Error in console
<Tabs
        value={tabIndex}
        onChange={onTabChange}
        indicatorColor={colors.primary}
        textColor={colors.primary}
      >
        {items.map(({ label, id, count = 0 }) => (
          <Tab key={id} label={`${t(label)} (${count})`} />
        ))}
      </Tabs>
      <SwipeableViews index={tabIndex} onChangeIndex={updateTabIndex}>
        <div>Tab 1</div>
        <div>Tab 2</div>
        <div>Tab 3</div>
      </SwipeableViews>

Context

Your Environment

Tech Version
react-swipeable-views ^0.13.5
React ^16.12.0
platform
etc

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 8
  • Comments: 18 (1 by maintainers)

Most upvoted comments

Same issue with v0.13.5 as mentioned by @shafaqkazmi, I had to downgrade to v0.13.3 to make it work.

I downgraded it to 0.12.18, although it’s 1 year old, it started working on my machine.

I’m fine with 0.13.4, not above. I also was abused by the latest tag on the rc… no big deal I downgraded. Thanks for your efforts @jeanpoelie

I’m facing the same issue. The package is not stable from v0.13.1 onward.