Spread operator with React component props

You can’t do that.

What’s happening is that javascript allow you to choose the name you want to give to each object property, example:

const dosomething = ({x: hello, y: hello2, z: hello3}) => console.log(hello, hello2, hello3);

dosomething({x: 1, y: 2, z: 3});

When you don’t specify the name, like in ({x, y, z}), javascript will pick the same name for you: ({x: x, y: y, z: z}). This means that you must specify a name, be it manually or javascript doing it automatically for you.