Adding useEffect in HMR causes "Expected static flag was missing"

This issue has been created since 2022-11-21.
Warning: Internal React error: Expected static flag was missing. Please notify the React team.

https://twitter.com/dan_abramov/status/1593609862830759936

This was also repro:ed in Next.js by @sokra:

image

gaearon wrote this answer on 2022-11-21

With Fast Refresh the issue is that we shouldn't be counting Hooks after return as part of the signature. I think that's a bug that we should be able to fix.

But I wonder if we should remove this warning altogether. This was attempted in #24525 but never shipped. It always shows up when you have a conditional useEffect, as noted in #24391.

There was also #24535 and then #25216 but they are not shipped either. Maybe worth prioritizing?

More Details About Repo
Owner Name facebook
Repo Name react
Full Name facebook/react
Language JavaScript
Created Date 2013-05-24
Updated Date 2022-12-10
Star Count 198882
Watcher Count 6638
Fork Count 41302
Issue Count 1120

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
bug(lang): starship fails to run with runtime.mount 5 2022-10-13 2022-10-29
confluence_root_homepage doesn't appear to work for personal spaces 3 2022-02-08 2022-10-15
Cloud Server PAT authenticate error 4 2022-02-04 2022-10-07
Too high performance of semi supervised learning 2 2021-05-16 2022-09-30
Fail to reimplement your paper's result for semi-supervised. 8 2021-06-05 2022-10-18
Some columns don't sort properly 0 2021-06-22 2022-10-10
GUI Config not available when invoked with "wayfire" but available when invoked with "startwayfire" 4 2022-07-08 2022-11-13
Make the extension translatable! 0 2022-01-27 2022-12-02
[Private Cloud]: export Presto metrics with JMX exporter 0 2022-08-17 2022-08-31
Add Split to function list 2 2021-10-15 2022-10-21
travis test suites started failing: TypeError: this.global.page.addListener is not a function 2 2020-05-29 2022-11-18
Circus + Puppeteer 0 2020-05-21 2022-01-09
Serilog.Enrichers.GlobalLogContext.dll Strong named validation failed 2 2022-09-01 2022-09-07
Zkt: explicitely consider timing dependences across several instructions 2 2021-10-25 2022-11-29
Does not work in recent xdbg versions 0 2021-04-01 2022-12-10
util.permute functions encounter integer overflows 5 2021-12-26 2022-11-23
Benchmark the proposed Postgres DB schema and queries 0 2021-12-15 2022-10-20
Link Checker Report 0 2021-10-04 2022-01-02
Link Checker Report 0 2021-10-11 2022-01-02
Indicate what is wrong with a request for `bad_request_handler` 2 2021-12-30 2022-11-15
Panic when downloading pprof 3 2021-11-04 2022-09-09
Designer is making duplicate API requests uncessarily 0 2022-10-20 2022-11-14
[Spaces] Something wrong happens when I join a room listed in a sub-space without joining the sub-space before 5 2022-08-19 2022-08-28
Data Type Values Restriction, Property stereotype management, Import/reference for reuse 1 2022-09-27 2022-11-29
In spherical polar coordinates, theta limits not symmetric about pi/2 cause geometric source term errors 10 2021-03-02 2022-12-01
Change insider extension version formula after Prisma 4 2 2022-06-23 2022-11-29
[Docs] #12896 fix: remote azure url 0 2022-04-13 2022-10-03
dynamic groups validation fails but actually works 3 2022-08-24 2022-09-27
Sort and filter does not work at the same column 1 2022-11-07 2022-12-02
Add Velocity to Network Installation in Wiki 1 2021-09-01 2022-10-10
Cannot read property 'nplurals' of undefined when using dev language 1 2019-07-03 2022-12-09
Check that Cart & Checkout extensibility docs include the Mini Cart when it is relevant 0 2022-02-04 2022-07-23
Decode Error, con't decode with "gbk" 0 2019-09-28 2022-11-21
Cannot find module 'next/dist/server/node-polyfill-fetch' when creating new app with yarn 0 2022-11-08 2022-11-01
npm run build keeps lots of jest-worker child process and eating up all memories after some builds 1 2022-11-08 2022-11-01
Next js 13 moves all meta tags to the head tag including schema markup meta tags 0 2022-11-08 2022-11-01
[React] noRowsOverlayComponent not re-rendered on noRowsOverlayComponentParams changed 5 2022-06-23 2022-11-01
[OFFICIAL] https://artifacthub.io/packages/helm/allegroai/clearml 1 2021-07-27 2022-10-19
Confluence Cloud: Diagrams not visible in new presenter mode 2 2022-05-20 2022-11-21
Data Expression Styling of Map Features - Text Offset Bug 1 2021-08-27 2022-10-04
no context menu for lane after cycling through with left click 1 2022-09-12 2022-09-22
Angular tests are much slower since upgrade NX from 13 to 14 1 2022-08-25 2022-09-27
Use RN ActivityIndicator as fallback for FluentActivityIndicator 3 2021-12-08 2022-09-07
Telegrambot Receiver doesn't receive every message 1 2021-05-05 2022-11-22
PowerRename and ReSizer isn't in Context Menu 2 2021-09-07 2022-10-27
uplift code to ES2021 0 2021-06-27 2022-10-29
[FEATURE] Implement a rule in the extension to allow deletion of non-existent partitions 0 2021-12-16 2022-11-20
Lucene94HnswVectorsFormat validation fails with large segments 1 2022-10-18 2022-11-24
Docker | Change Data Directory 10 2021-11-27 2022-11-18
Create new class is not being offered 0 2021-11-09 2022-11-20