Is it better practice to pass only the values you need from the base into child components or is it okay (performance-wise) to pass down the whole record object?
For example:
function ParentComponent({record}){
const status = record.getCellValue("Status")
const date = record.getCellValue("Date")
const otherField = record.getCellValue("Other field")
return (
<ChildComponent status = {status} date = {date} otherField={otherField} />
)
}
vs.
function ParentComponent({record}){
return (
<ChildComponent record = {record} />
)
}
I’ve been doing the former but its gotten kind of disorganized when I’m using a lot of fields from a record.
Does the record object actually contain all the data in its fields or just the method to retrieve them from airtable?
Thanks!