ES6 grammar problems

see a code like this,

would like to ask,

this.state = {
    data: []
} 

and

this.ResultArray = [];

what"s the difference

Mar.09,2021

makes no difference, they all assign values to attributes, but this.state assignments are multi-level objects, this.ResultArray arrays.


doesn't understand what you're asking. Just initialize the assignment. The type of


ResultArray is an array, while the type of state is an object whose data property is an array. In essence, it is that the data type is different. Is that what you want to ask

?
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-1b388a0-2b89c.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-1b388a0-2b89c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?