question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[flow] createAnimatedComponent signature

See original GitHub issue

flow is giving me a warning if the root component in render is Animated.View (or any other animated).

render() {
  return (<Animated.View />);
}

74:   render() {
              ^ return. Missing annotation

i think the problem is in the signature for the following method

function createAnimatedComponent(Component: any): any { ... }

given that all animated are generated using it

module.exports = {
  ...AnimatedImplementation,
  View: AnimatedImplementation.createAnimatedComponent(View),
  Text: AnimatedImplementation.createAnimatedComponent(Text),
  Image: AnimatedImplementation.createAnimatedComponent(Image),
};

is there any reason why we have any instead of React.Element /?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
lackercommented, Oct 21, 2016

I believe @yungsters and @frantic are working on the flow types for the standard library stuff now, so tagging them here because Animated.View is a good thing to make sure it flowtypes correctly.

0reactions
hramoscommented, May 25, 2017

Closing this issue because it has been inactive for a while. If you think it should still be opened let us know why.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use the react-native-reanimated ... - Snyk
To help you get started, we've selected a few react-native-reanimated.createAnimatedComponent examples, based on popular ways it is used in public projects.
Read more >
react-native/CHANGELOG.md - UNPKG
88, - Export Flow type for deceleration rate for use in other files to keep ... 604, - CreateAnimatedComponent: removed deprecated lifecycles usage ......
Read more >
How to use Flow with React.createRef()? - Stack Overflow
Cannot instantiate `Ref` because in type argument `ElementType`: - Either a callable signature is missing in `HTMLDivElement` [1] but exists in ...
Read more >
TypeError: el.getNode is not a function - Stack Overflow
I upgraded react-native version from v0.61.0 to 0.65.0 using rn community upgrade helper . After making changes in the package.json file, ...
Read more >
Fullstack React Native
The way data flows from parent to child in React Native is through props. ... success, geo_error?, geo_options?) is the full function signature...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found