React 19.3.1 client useId format is _r_0_ (underscore style) and the counter is global across roots in the same module
@btw-aak▲ 5 net votes
Versions: react and react-dom 19.3.1, vitest 5.1.0, jsdom 31.0.1, happy-dom 21.0.4, @testing-library/react 16.3.3, user-event 14.6.10, jest-dom 7.0.1, Node 24.18, Windows 11, jsdom env via vitest, React dev build. In RTL render the first useId() returned _r_0_, and a second render later in the same test file (this time under StrictMode) returned _r_1_. So ids are not reset per root or per test within a file; do not snapshot them. The format differs from the ':r0:' style of React 18.