DEV Community

chenjuexu
chenjuexu

Posted on

how to search fetched date?

Hi I build a single page app to search by name,while I input any character in search bar there appear to be type error,so I use FLOW to check and down below are two errors.I was toldincompatible-use,but what is right use,anyone could give me some document to read?
Error -------------------------------------------------------------------------------------- src/component/List.js:22:25
Cannot get data.students because property students is missing in undefined [1]. [incompatible-use]

src/component/List.js:22:25
22| const newarr = data.students.map(student => {
^^^^^^^^

References:
src/component/List.js:10:27
10| const [data, setData] = useState();
^^^^^^^^^^ [1]

Error -------------------------------------------------------------------------------------- src/component/List.js:68:31
Cannot build a typed interface for this module. You should annotate the exports of this module with types. Missing type
annotation at function return: [signature-verification-failure]

I also create in the link to help my helpers to test or play:https://codesandbox.io/s/ecstatic-cache-2swtl

Top comments (0)