ReferenceError: calledOnce is not defined
See original GitHub issueWhen used with react-hot-loader
it throws this error
VM37389:13 Uncaught ReferenceError: calledOnce is not defined
at ProxyComponent.result [as getDateFilterMinDateRefinement] (eval at __reactstandin__regenerateByEval (VM36190 CourseSearch.js:NaN), <anonymous>:13:5)
at eval (eval at __reactstandin__regenerateByEval (VM36190 CourseSearch.js:NaN), <anonymous>:45:36)
at ProxyFacade (react-hot-loader.development.js:647)
at mountIndeterminateComponent (react-dom.development.js:13380)
at beginWork (react-dom.development.js:13820)
at performUnitOfWork (react-dom.development.js:15863)
at workLoop (react-dom.development.js:15902)
at HTMLUnknownElement.callCallback (react-dom.development.js:100)
at Object.invokeGuardedCallbackDev (react-dom.development.js:138)
at invokeGuardedCallback (react-dom.development.js:187)
getDateFilterMinDateRefinement()
is a function that’s wrapped in memoize()
.
The error happens, for example, when the component containing memoization is removed from code and then hit “Save” so that it hot-reloads.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Test a simple express app: Uncaught ReferenceError: done is ...
I tried to test a simple express app by following this tutorial. After running mocha test.js Error I got is: done is not...
Read more >Assertions - Sinon.JS
Sinon.JS ships with a set of assertions that mirror most behavior verification methods and properties on spies and stubs. The advantage of using...
Read more >Errors | Node.js v18 API
C ReferenceError. Extends: errors.Error. Indicates that an attempt is being made to access a variable that is not defined. Such ...
Read more >ReferenceError - filename is not defined in ES module scope
Join this channel to get access to perks:https://www.youtube.com/channel/UCoSpmr2KNOxjwE_B9ynUmig/joinMy GearCamera ...
Read more >Stack trace API - V8 JavaScript engine
ReferenceError : FAIL is not defined at Constraint.execute ... Note that the custom prepareStackTrace function is only called once the stack property of ......
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 Free
Top 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
@alexreardon thanks for the context, it’s really helpful, I can confirm the error is gone after upgrade
react-hot-loader
to^4.3.0
, but seems the memoized function won’t be reloaded any more, but that’s not the problem of this library (UPDATE: that’s intended https://github.com/gaearon/react-hot-loader/pull/1002)Thanks for your great library 👍 , I think it’s good to close now, but change the label to
question
in case the others meet the same problemRight now I have to workaround like this
this.method = module.hot ? this.method : memoize(this.method)