{... status} how to understand this way of writing

see a code like this when learning react-hooks

function Box(props) {

 const [value, setValue] = useState(0)
 
 let status = useSigninStatus(false)

 function Incv(){
   return setValue(value+1)
 }

 function Decv(){
   return setValue(value-1)
 }

 return(
   <div >
     <header>
       <Signin {...status} />
       <Counter isSignin={status.isSignin}  value={value} Incrm={Incv} Decrm={Decv} />
     </header>
   </div>
 )
}

value= {value} I understand, but Signin says {... status} directly here. I haven"t seen it before. I"d like to know how to understand it. Is it a special grammar?

Jun.20,2022

this kind of writing is similar to * * kwargs in python, for example, our status is:

const status = {a: "a", b: "b"};
{ ...status } // => { a: "a", b: "b" }
{ c: "c", ...status, d: "d" } // => { a: "a", b: "b", c: "c", d: "d"}

so, {... status} is equivalent to Object.assign ({}, status);

Menu