【发布时间】:2018-08-08 10:06:04
【问题描述】:
我正在使用 React + Flow 构建应用程序,但我遇到了一个愚蠢的样式问题。
基本上,我已经(恢复):
import styled from 'styled-components';
import { Link } from 'react-router-dom';
export const Item = styled(Link)`
some styling here
`;
我从 Flow 收到以下错误:
Cannot call `styled` because:
- Either a callable signature is missing in object type [1].
- Or a callable signature is missing in object type [2].
如何在不出现此错误的情况下为自己的组件设置样式?
谢谢!
【问题讨论】:
标签: reactjs flowtype styled-components