I have this:
import React, { useReducer } from 'react';
import { Item, List } from '../Types';
type Props = {
items: List;
};
const TodoList: React.SFC<Props> = ({ items, children }) => {
return items.map((item: Item) => <div key={item.id}>{item.id}</div>);
};
export default TodoList;
I keep getting:
Type '({ items, children }: PropsWithChildren) => Element[]' is not assignable to type 'FunctionComponent'. Type 'Element[]' is missing the following properties from type 'ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>': type, props, key