简体   繁体   中英

React es6 syntax

What does this syntax mean?

this part : $FlowFixMeProps, $FlowFixMeState

class Tester extends React.Component<$FlowFixMeProps, $FlowFixMeState> {
...
}

Thanks,

Looks like it's from the type checking library FlowJS.

See: https://flow.org/en/docs/react/components/

This syntax looks like typescript to me.

The $FlowFixMeProps is the class of your react component's props and $FlowFixMeState is the class of your react component's the state.

An example of using typescript with react is here . You can maybe find more information of how this react/ts combination can work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM