React Table Accessor [best] -

Header: "Full Name", accessor: (row) => `$row.firstName $row.lastName` ,

Header: "Age Group", accessor: (row) => const age = new Date().getFullYear() - new Date(row.birthDate).getFullYear(); return age < 18 ? "Minor" : "Adult"; react table accessor

| Scenario | Accessor Type | |----------|----------------| | Simple property | String | | Nested property (safe) | String with dot | | Format currency / date | Function | | Concatenate fields | Function | | Conditional logic | Function | | Performance‑critical | String (or memoized function) | Header: "Full Name", accessor: (row) =&gt; `$row