Where does TABBED_SECTIONS come from in the TabbedHeaderList example? #327
-
The docs say the So I assigned and array of objects to
But I get a type error on the
|
Beta Was this translation helpful? Give feedback.
Answered by
mateusz1913
May 10, 2023
Replies: 1 comment
-
@thecompoundingdev the expected type is the same as in the const TABBED_SECTIONS = [
{
// add required data array
data: [
{ itemId: '1' },
{ itemId: '2' },
],
title: 'section1',
description: 'section one is a great section'
},
{
// add required data array
data: [
{ itemId: '1' },
{ itemId: '2' },
],
title: 'section2',
description: 'section two is a good section'
},
]; |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mateusz1913
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@thecompoundingdev the expected type is the same as in the
SectionList
, you can check the dummy data in the example repo - in your case, there's no requireddata
where you have all items for specific section. You should define sections in following way: