question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when clicking on the menu item on React 16

See original GitHub issue

Workaround: https://github.com/storybooks/storybook/issues/1965#issuecomment-336912108 (https://github.com/storybooks/storybook/issues/1965#issuecomment-335414898)

I’ve updated to react 16 and there’s this strange error: when I click on any menu item (to open other story or group) I have blank screen (nothing at all is rendered).

I use yarn storybook to start storybook.

yarn run v1.1.0
$ start-storybook -p 9009 -s public
@storybook/react v3.2.12
=> Loading static files from: /home/mozgiii/Desktop/truvest/webapp/public .
=> Loading custom addons config.
=> Using default webpack setup based on "Create React App".
webpack built 8fda9afa05b5574a775e in 5531ms                                              
Storybook started on => http://localhost:9009/

Initially page loads on the first story. Looks ok so far, but there are some errors in the console: image image

Here’s the log as saved by chrome: localhost-1507074821359.log

Now, when I click on any menu item something bad happends and I have blank screen. There are new errors in the console: image image Some skipped, it’s only the beginning and the end…

New log: localhost-1507075072650.log

I have no idea why this is happening. I tried using react 15 again and it works there. I’ve also tried removing all my storeis and using only standard “welcome” with the same results - I think it means the issue is somewhere in the package.

I’m using CRA, here’s some info on my setup:

Keywords:

  • Uncaught TypeError: Cannot read property 'velocity1507074569941' of null
  • The above error occurred in the <TransitionGroup> component:

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:24 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
mthuretcommented, Oct 17, 2017

a temporary workaround I found with this issue (as upgrading to 3.2.12 wasn’t enough), is to use the options addon and set sidebarAnimations to false.

react-treebeard uses velocity-react for those animations and somehow it’s not working anymore with React16.

3reactions
MOZGIIIcommented, Oct 23, 2017

It works! So it was a yarn bug all along… Thank you very much.

Read more comments on GitHub >

github_iconTop Results From Across the Web

<Menu> throws "type is invalid" error ... no matter what I do
Now you have to get MenuItem from material-ui/Menu. That works. It's' Menu that doesn't work. The import doesn't fail, but the value of...
Read more >
Error Handling in React 16 – React Blog
Introducing Error Boundaries​​ To solve this problem for React users, React 16 introduces a new concept of an “error boundary”. Error boundaries ...
Read more >
[Menu] Not appearing in the correct place · Issue #8090
When I create an IconButton with a menu that activates on mouse click, the Menu should open on top of the IconButton because...
Read more >
How to Handle Errors in React
To make sure we're on board with what it is, here's one: try { somethingBadMightHappen(); } catch (error) { console.error("Something bad ...
Read more >
React Error Handling And Reporting With Error Boundary ...
On the left navigation click on Settings . Underneath the ORGANIZATION menu, click on Projects . In that list, click on your error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found