[react-native + automatic jsx transform] RangeError: Maximum call stack size exceeded
See original GitHub issueHi,
Before we used why-did-you-render
without automatic jsx transform and it worked good. However, after adding babel-plugin-transform-react-jsx
the library doesn’t seem to be working. I’ve tried to do everything as per readme, but since the project is written in react-native
I had to change some lines of code. Here is my config:
module.exports = function BabelEnvConfiguration(api) {
api.cache(true);
const isDev = process.env.BABEL_ENV === "development";
const config = {
presets: [
// `useTransformReactJSXExperimental` is needed here in order to exclude
// `plugin-transform-react-jsx-source` and `plugin-transform-react-jsx-self`
// because they will be injected by `@babel/plugin-transform-react-jsx-development`
["module:metro-react-native-babel-preset", { useTransformReactJSXExperimental: true }],
],
plugins: [
!isDev // since we can not pass `development` as in `@babel/preset-react`, I'm using ternary operator here
? [
"@babel/plugin-transform-react-jsx",
{
runtime: "automatic",
},
]
: [
"@babel/plugin-transform-react-jsx-development",
{
runtime: "automatic",
importSource: "@welldone-software/why-did-you-render",
},
],
],
};
return config;
};
And I’m getting RangeError: Maximum call stack size exceeded
error 😔 (stacktrace is below)
I’m pretty sure I’m missing something important but I can not understand what’s exactly 🙂 I hope you will give a direction for further investigation, because I’ve tried everything that is possible and it still doesn’t work.
Thank you for your help in advance!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
JavaScript RangeError: Maximum Call Stack Size Exceeded
The RangeError: Maximum call stack size exceeded is thrown when a function call is made that exceeds the call stack size. This can...
Read more >Calling useState inside a function causes maximum call stack ...
I am trying to set the data returned from firebase in useState variable but I got maximum call stack size exceeded error in...
Read more >[Solved]-React For Loop - Uncaught (in promise) RangeError
Coding example for the question React For Loop - Uncaught (in promise) RangeError: Maximum call stack size exceeded-Reactjs.
Read more >React native - Maximum call stack size exceeded - Reddit
Maximum call stack error is likely caused by recursive function calls causing an infinite recursion. Binding and reference not being released ...
Read more >React-native debugging error: Maximum call stack size ...
Sometimes calling a recursive function over and over again, causes the browser to send you Maximum call stack size exceeded error message as...
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
Can’t help but I can report I have the same issue on my projet. RN 0.66.1, React 17.0.2, also with useTransformReactJSXExperimental.
not working either with RN
0.70.05
, React18
, wdyr7.0.1
, anyone able to run on RN not using expo?