【发布时间】:2020-11-03 08:55:25
【问题描述】:
我有一组信息,我想在一个数组中表示,然后将它们拉到一个 react native 平面列表中,但我不知道该怎么做。
基本上,字幕有不同的标题,每个字幕都有内容。我想通过列表映射并显示它们。
以下是我目前的代码,但它似乎不起作用。
const NigLawList= ({navigation}) => {
const [people, setPeople] = useState([
{Law: "Evidence Act", id: "1",
part:[ {name: "Title one", meaning: "Content is here"},
{name: "Title 2", meaning: " Content is here"}
]
},
])
【问题讨论】:
-
请提供有关您尝试执行的代码的更多信息并完成错误
-
其实我还没有任何代码。我只是想知道我是否可以在 react native flatlist 中显示这种信息
-
请查看上图
标签: javascript arrays reactjs react-native react-native-flatlist