有沒有更好的方式來鍵入註釋children
?兒童流動型註釋反應元素
type FilterLinkProps={
filter:State$VisibilityFilter,
children:any
};
const FilterLink = ({
filter,
children
}:FilterLinkProps) => {
return (
<a href='#'
onClick={e => {
e.preventDefault();
store.dispatch(({
type: 'SET_VISIBILITY_FILTER',
filter
}:Action$VisibilityFilter));
}}
>
{children}
</a>
);
};