-
the two export ways
// App.js
const App = function () {
// toggle comments this line and save, the console will log error
// const [test, setTest] = useState(0);
return (
<div>...</div>
)
}
export default observer(App);
// App.js
const App = observer(function () {
// toggle comments this line and save, isOk
// const [test, setTest] = useState(0);
return (
<div>...</div>
)
})
export default App; How to reproduce the issue: the demo url : https://github.com/allSmi/cra-app
Versions
Question Thanks😊😊😊 |
Beta Was this translation helpful? Give feedback.
Answered by
urugator
Aug 17, 2022
Replies: 1 comment 1 reply
-
On the first sight, probably relates to |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
allSmi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On the first sight, probably relates to
fast-refresh
#2668Can you try without
fast-refresh
(eg run in production mode)?