-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
breaks in React 16: Cannot read property 'toLowerCase' of undefined #53
Comments
This issue is occurring for me as well. I am also using Next.js |
Make sure you're importing things correctly. I had the same issue when i tried to import a component like this: |
I have been unable to reproduce this issue. I have tested all of our examples with React 16 and they all work perfectly. Can you please show me the code that you are using to import Also, make sure that you are using version |
This was happening to me with next.js and a shared lerna library on some shared code and the problem was the react component wasn't defined with a const, instead it looked like this:
However the 'Thing' component needed to be a const. I'm assuming the variable was disappearing from scope and thus the error. Not sure if it is the same issue you might be having, but I hope to help some one.
|
@rickbyington Your first code example is invalid. Try this code instead: let Thing = () => {
return (
<span>Test</span>
)
}
export { Thing } (Notice the |
@Pauan I'm getting the exact same crash on server side rendering. I narrowed it down and it seems the crash is this: Apparently the type is undefiend. This is the object that is trying to run toLowerCase() on:
I following the example to load my chart: |
did you also update react-dom ? |
what was the solution? |
update react-dom solves the issue |
I'm rewriting an application in React Fiber and AmCharts no longer seems to work.
I can console log AmCharts and AmCharts.React just fine, but as soon as I try to render it like so:
return <AmCharts.React {...config} />
I get the following error:
AmCharts version 2.0.7
any idea how to fix this?
The text was updated successfully, but these errors were encountered: