Top "Flowtype" questions

Flow is a static type checker, designed to find type errors in JavaScript programs, created by Facebook.

How to correct flow warning: destructuring (Missing annotation)

I'm writing a small React Native app and I'm trying to use Flow, but I can't really get a proper …

javascript reactjs react-native flowtype
React - using TypeScript vs Flow vs?

I'm currently learning React and I think I understand it pretty well. However, there's one thing that's been bothering me …

javascript reactjs typescript babeljs flowtype
Plugin/Preset files are not allowed to export objects, only functions

I'm getting this error after updating react-native to "^0.56.0": bundling failed: Error: Plugin/Preset files are not allowed to export objects, …

react-native babeljs flowtype babel-preset-env
Flow: Create a flow type by extending another type

type someType = { keyOne: string, keyTwo: string, }; type someOtherType = { keyOne: string, keyTwo: string, keyThree: string, }; Both of these types are objects …

javascript casting type-conversion flowtype
How to use/define Enums with Flow type checking?

I'm trying to migrate an existing codebase to use Flow. Since this project started without Flow, I'm using a pretty …

javascript enums flowtype
How to type check a Date object in flow?

I have a function that takes a Date object as its paramater. I am not able to figure out how …

javascript flowtype
Flow type checker errors in node_modules/*

I've initialized flow project with flow init in fresh https://github.com/davezuko/react-redux-starter-kit project. When Flow does it check, …

javascript flowtype
How to use Flow with React.createRef()?

Since React 16.3 it is possible to use React.createRef() to access a DOM element. I am also using Flow in …

reactjs flowtype
flow type annotation for children react elements

Is there a better way to type-annotate children ? type FilterLinkProps={ filter:State$VisibilityFilter, children:any }; const FilterLink = ({ filter, children }:FilterLinkProps) =&…

javascript reactjs flowtype
typed react - props as `type` or an `interface`

I have react code export default class MyComponent extends Component<Props,State> The question is, do I write …

reactjs typescript flowtype