TokenInfo is not found in 'flow-native-token-registry'
wuyahuang opened this issue · comments
Hi, I tried to use 'flow-native-token-registry' on react, but I got an error.
Source code:
import { TokenListProvider, TokenInfo } from 'flow-native-token-registry';
console.log(TokenListProvider);
console.log(TokenInfo);
Error info:
export 'TokenInfo' (imported as 'TokenInfo') was not found in 'flow-native-token-registry' (possible exports: CDNTokenListResolutionStrategy, CLUSTER_SLUGS, ENV, GitHubTokenListResolutionStrategy, StaticTokenListResolutionStrategy, Strategy, TokenListContainer, TokenListProvider)
TokenInfo
only refers to a type not a value
It's for typescript ,so we need to keep that for typescript environment
If you use javascript you can ignore the TokenInfo
type
You should update the README.md then. This line of code from demo of reactjs throws an error when it is compiled.
const [tokenMap, setTokenMap] = useState<Map<string, TokenInfo>>(new Map());