mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
This was missed in the mount dev dispatcher. It was only in the rerender dispatcher which means that it was only logged during the rerender. Since DevTools can hide logs during rerenders, this hid the warning in StrictMode.
17 lines
366 B
JavaScript
17 lines
366 B
JavaScript
'use client';
|
|
|
|
import * as React from 'react';
|
|
|
|
import Container from './Container.js';
|
|
|
|
export function Counter({incrementAction}) {
|
|
const [count, incrementFormAction] = React.useActionState(incrementAction, 0);
|
|
return (
|
|
<Container>
|
|
<form>
|
|
<button formAction={incrementFormAction}>Count: {count}</button>
|
|
</form>
|
|
</Container>
|
|
);
|
|
}
|