Render count

Controlled and uncontrolled modes compared with render counters

controlled
Form renders: 1
Child renders: 1

Signed as —

uncontrolled
Form renders: 1
Child renders: 1

Signed as —

  • RenderCount.tsx
  • CurrentName.tsx
  • ExpensiveChild.tsx
  • ProfileForm.tsx
  • RenderCountBadge.tsx
import { Stack } from '@mantine/core';
import { ProfileForm } from './ProfileForm';

export function RenderCount() {
  return (
    <Stack>
      <ProfileForm mode="controlled" />
      <ProfileForm mode="uncontrolled" />
    </Stack>
  );
}