-
Notifications
You must be signed in to change notification settings - Fork 50.6k
Closed
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug
Description
React version: 19
Steps To Reproduce
- Set props with bigint
import { useCallback, useState } from 'react';
interface ServiceItem {
name: string;
regionIds: bigint[];
}
interface MachineItem {
name: string;
services: ServiceItem[];
}
interface MachineItemProps {
machine: MachineItem;
}
function Machine(props: MachineItemProps) {
return (
<>
<p>{props.machine.name}</p>
{props.machine.services.map(service => (
<p key={service.name}>{service.name}</p>
))}
</>
);
}
export default function Page() {
const [update, setUpdate] = useState(0);
const [machine, setMachine] = useState(() => {
return {
name: 'machine1',
services: [
{
name: 'service1',
regionIds: [31321968590458880n]
}
]
};
});
const onClick = useCallback(() => {
setUpdate(update => ++update);
setMachine(() => {
return {
name: 'machine2',
services: [
{
name: 'service2',
regionIds: [31321968590458881n]
}
]
};
});
}, []);
return (
<>
<Machine machine={machine} />
<button onClick={onClick}>Update {update}</button>
</>
);
}Link to code example:
https://codesandbox.io/p/sandbox/pedantic-shirley-cg3nf8
The current behavior
Throw exception
The expected behavior
Do not throw exception
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug
