React - Browser error: fn.apply is not a function
See original GitHub issueDescribe the bug
Most of my components produce the following error in the browser.
TypeError: fn.apply is not a function
To Reproduce Steps to reproduce the behavior:
npm run storybook
- Error shows up in browser
Expected behavior No error, show my component
Screenshots
System:
Environment Info:
System:
OS: macOS 10.15.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
Yarn: 1.19.0 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
Browsers:
Chrome: 78.0.3904.97
Safari: 13.0.3
npmPackages:
@storybook/react: ^5.2.6 => 5.2.6
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Storybook with Vite error: fn.apply is not a function
I found a similar issue on Storybook's GitHub, and tried to change names StorybookName to storybookName in all the stories, also checked all...
Read more >'X' is not a function TypeError in React [Solved] | bobbyhadz
Another common reason the "Uncaught TypeError: X is not a function" error occurs in React is when we try to call a function...
Read more >Type error: fn is not a function. I don't know how to fix that.. Any ...
I've been trying to code a Discord bot to do a Timed mute, but there seems to be an error which I don't...
Read more >TypeError: "x" is not a function - JavaScript - MDN Web Docs
Maybe there is a typo in the function name? Maybe the object you are calling the method on does not have this function?...
Read more >How to solve the "is not a function" error in JavaScript
Join the waiting list, reserve your spot in my 10-weeks cohort course and learn the fundamentals, HTML, CSS, JS, Tailwind, React, Next.js and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Found my problem… I wasn’t exporting a proper React component. This
export const card = <Card>This is a card</Card>;
Should have been thisexport const card = () => <Card>This is a card</Card>;
same question. but it looks like can’t use Upper Camel Case just like
when I use little camel-case
it’s ok.