flowtype Questions
24
Solved
I have the next code, eslint throw:
react/prop-types onClickOut; is missing in props validation
react/prop-types children; is missing in props validation
propTypes was defined but eslint does not...
Kuth asked 31/7, 2016 at 14:19
2
Solved
I'm struggling with what I feel shouldn't be too hard of a setup.
I want these three technologies to work together:
webpack to bundle code
babel so that I'm able to write modern JavaScript
flow b...
Philcox asked 13/12, 2017 at 22:27
11
Solved
I created a new React project with create-react-app.
In the terminal npm start.
Instantly get this error
Failed to load plugin 'flowtype' declared in 'package.json »
eslint-config-react-app': Cann...
2
Solved
I get this error when running flow check, but I'm not sure what it means.
Cannot use exports as a type because exports is a value. To get the type of a value use typeof.
The error location is ...
Nonscheduled asked 27/3, 2018 at 8:55
4
Solved
I am trying to have a useRef obj to be either null or a function
here is code snippet
import "./styles.css";
import { useState, useRef, useEffect } from "react";
export default ...
Ine asked 6/10, 2022 at 1:35
1
Solved
flow-typed is a CLI tool that provides auto-discovery of flow type definitions for installed JS packages (and other things).
I usually use TypeScript over Flow and often find myself installing pack...
Mazer asked 11/10, 2020 at 20:3
6
In flow there is support for $Compose functions (see recompose as example). However, I can't seem to find such a mechanism in typescript. it seems that the best typescript can do is something like ...
Waistcloth asked 15/3, 2018 at 23:27
4
Solved
I am trying to configure eslint + babel-eslint + eslint-plugin-react + eslint-plugin-flowtype
I have the following devDependencies in package.json:
"babel-eslint": "^7.1.1",
"eslint": "^3.10.2",
...
Reticule asked 23/11, 2016 at 15:24
3
Solved
I've initialized flow project with flow init in fresh https://github.com/davezuko/react-redux-starter-kit project.
When Flow does it check, it finds several errors in node_modules.
Errors are ha...
Gyve asked 6/7, 2016 at 13:42
4
If have this simple SectionList definition in my code:
const s = (
<SectionList
renderItem={({ item }) => <Text>abc</Text>}
renderSectionHeader={({ section }) => <Text&g...
Fovea asked 5/10, 2017 at 17:43
2
Solved
I am using VSCode (1.34.0) + Flow (Flow Language Support: 1.1.1, Flow Language Client: 0.2.1) (switched to Typescript but still having the same error) Typescript 3.4.5 on my React Native project.
...
Autarchy asked 18/4, 2019 at 7:57
4
Considering that there is a project that should be converted from TypeScript to Babel, files contain typing information that cannot be just ignored by Babel.
How can TS type annotations and assert...
Noletta asked 19/8, 2016 at 18:35
4
Solved
How should we be using Flow type annotations with react hooks, such as useState? I've tried searching for some examples of how they should be implemented, but can't find anything.
I tried this:
...
1
I ejected from create-react-app and I am having problems using import type when I run the test site (using yarn start).
Module parse failed: /project/src/web/MarkdownField.js Unexpected token (6:1...
Judicature asked 5/10, 2017 at 0:34
2
We have a pure component, and we are trying to convert this to the Flow type safety. The application is using this component as a HOC ( High-Order Component). It is generating a context and injecti...
1
I'm reading through the React source code recently, and just found all the files are .js instead of .ts
what blows up my mind more is, in those .js files, they are actually using TypeScript syntax,...
Whittemore asked 26/5, 2021 at 9:55
4
Solved
I got vujes typescript project and in vuex store i got something like:
async getUserProfile ({ dispatch, commit }: any) {}
Well i dont want any because that suck and you dont have help/autocompl...
Situation asked 16/5, 2018 at 15:54
5
Solved
If you take a look at the flow docs on covariant/contravariant fields in interfaces, covariant implies read-only and contravariance implies write-only. However, I don't really understand why. In th...
Relational asked 18/9, 2018 at 0:26
1
It's fairly common to get errors within node_modules when upgrading Flow, but this makes a bunch of errors go away:
[declarations]
<PROJECT_ROOT>/node_modules/.*
Also, I assume it significan...
Anselm asked 5/3, 2021 at 6:32
4
Solved
I'm currently learning React and I think I understand it pretty well. However, there's one thing that's been bothering me regarding development of robust React applications - what tools do develope...
Digressive asked 26/4, 2016 at 17:51
2
Solved
i want to define an overloaded function like
function first(n?: number) {
if (number === undefined) {
// returns a single Item
return items[0];
}
// returns an array of Item
return items.sl...
Urban asked 1/3, 2017 at 18:23
2
We have a monorepo that uses Yarn’s ‘workspaces’ feature, meaning that whenever possible, Yarn will hoist dependencies to the monorepo's root node_modules directory rather than keep them in the ind...
Tarpon asked 13/8, 2018 at 14:33
3
Solved
Say you have a couple of simple Flow types with optional properties:
type A = { b?: B };
type B = { action?: () => void };
And you want to access the properties in a chain and know they are d...
Lewd asked 22/11, 2016 at 22:47
4
When I try to render Consumer, flow show next error:
[flow] Cannot create SidebarContextConsumer element because property changeOpenState is missing in undefined [1] in the first argument of pr...
2
Solved
I am building a nodeJS app using Flow, and I need to extend the default express annotation for express$Request to accommodate other fields that I tack on, like .user and .session.
unfortunately, w...
Shel asked 20/6, 2017 at 23:30
1 Next >
© 2022 - 2024 — McMap. All rights reserved.