React-native: Hot Reloading `Maximum call stack size exceeded` error with circular reference

Created on 31 Oct 2017  Â·  6Comments  Â·  Source: facebook/react-native

Carrying on from #7288 which has been opened for over a year.

Say, there are two files a.js and b.js.

a.js:

require('./b');

b.js:

require('./a')

After making a change to one of these files, with Hot Reloading enabled, it will run into an infinite situation and finally throw a Maximum call stack size exceeded error.

Even if I use a dynamic require in a function, such as what in b.js:

function f(){
  require('./a')
}

This is a pretty serious issue.

Ran Commands Locked

Most helpful comment

ffs, this is getting frustrating.

All 6 comments

@facebook-github-bot no-template

Hey @codebymikey, thanks for posting this! It looks like your issue is missing some required information. Can you please add all the details specified in the Issue Template? This is necessary for people to be able to understand and reproduce your issue. I am going to close this, but please feel free to open a new issue with the additional information provided. Thanks!

How to Contribute • What to Expect from Maintainers

ffs, this is getting frustrating.

This is a show-stopper for the entire framework and reason why I haven't done anything in React for past 5 months.

This issue is missing some required information and has been closed. For anyone running into this issue, please go ahead and open a new issue, making sure to fill in the template.

This is now fixed in master.

Was this page helpful?
0 / 5 - 0 ratings