The return value of reactjs using lodash cannot deconstruct the assignment.

    const L1items = [{
       title:"",
       L2items:[
            {
                title:"",
                L3items:["",""]
            }
        ]
    }
     let temp =new Object(_.find(L1items,(item)=>{
         ....
     }));  
     //titleL2items  
     //
     let {L2items} =new Object(_.find(L1items,(item)=>{
         ....
     }));  
     //react 

Environment: the latest version of react, using create-react-app scaffolding
you can use deconstruction assignments without the data returned by lodash.? But the output of the return value of lodash is the same as that of ordinary objects.-sharp-sharp-sharp

< H2 > reflection: < / H2 >

actually loadsh works, just because the logic in the find function cannot guarantee that a return value can be found (preferably a judgment first)
when you find that this kind of code that could have passed but reports an error, you have to see if the logic of the whole code is correct. no, no, no.

Apr.08,2021

I don't see it. What's wrong with it?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be7983-3187a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be7983-3187a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?