You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think babel is adding a polyfill because of the list of supported browsers. If you shorten your list to use only the Chrome and Firefox (unless you are using something else) you can get rid of the error without having to import anything into SearchParams.js
Otherwise as you said you can import regeneratorRuntime from "regenerator/runtime.js";
but your eslint won't love you for it 😉
Also be sure to re-run npm run dev after altering the list.
After I created a new file Results.js, I got a error when invoked the function requestPets():
SearchParams.js:9 Uncaught ReferenceError: regeneratorRuntime is not defined
at _requestPets (SearchParams.js:9)
at requestPets (SearchParams.js:9)
at onSubmit (SearchParams.js:44)
at HTMLUnknownElement.callCallback (react-dom.development.js:362)
at Object.invokeGuardedCallbackDev (react-dom.development.js:411)
at invokeGuardedCallback (react-dom.development.js:466)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:480)
at executeDispatch (react-dom.development.js:612)
at executeDispatchesInOrder (react-dom.development.js:637)
at executeDispatchesAndRelease (react-dom.development.js:743)
_requestPets @ SearchParams.js:9
requestPets @ SearchParams.js:9
onSubmit @ SearchParams.js:44
callCallback @ react-dom.development.js:362
invokeGuardedCallbackDev @ react-dom.development.js:411
invokeGuardedCallback @ react-dom.development.js:466
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:480
executeDispatch @ react-dom.development.js:612
executeDispatchesInOrder @ react-dom.development.js:637
executeDispatchesAndRelease @ react-dom.development.js:743
executeDispatchesAndReleaseTopLevel @ react-dom.development.js:752
forEachAccumulated @ react-dom.development.js:724
runEventsInBatch @ react-dom.development.js:769
runExtractedPluginEventsInBatch @ react-dom.development.js:914
handleTopLevel @ react-dom.development.js:5848
batchedEventUpdates$1 @ react-dom.development.js:24343
batchedEventUpdates @ react-dom.development.js:1463
dispatchEventForPluginEventSystem @ react-dom.development.js:5943
attemptToDispatchEvent @ react-dom.development.js:6059
dispatchEvent @ react-dom.development.js:5963
unstable_runWithPriority @ scheduler.development.js:815
runWithPriority$2 @ react-dom.development.js:12188
discreteUpdates$1 @ react-dom.development.js:24359
discreteUpdates @ react-dom.development.js:1486
dispatchDiscreteEvent @ react-dom.development.js:5926
Later I figured out, I added a extra import at SearchParams.js
import regeneratorRuntime from "./../node_modules/regenerator/runtime.js";
Not sure if it happend to anyone?
The text was updated successfully, but these errors were encountered: