Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Missing "<Props, State>" when static typing components with Flow. #135

Closed
1 of 2 tasks
mbsrc opened this issue Nov 11, 2017 · 2 comments
Closed
1 of 2 tasks

Missing "<Props, State>" when static typing components with Flow. #135

mbsrc opened this issue Nov 11, 2017 · 2 comments

Comments

@mbsrc
Copy link
Contributor

mbsrc commented Nov 11, 2017

I'm submitting a ...

  • bug report
  • feature request

Bug Report:

Hello Vladimir,

I've been using the previous version of this project for about a month now and wanted to thank you for all your great work so far! I learned a lot while reading through the code in this repo.

  • What is the current behaviour?

While reading through the new code, I noticed that Flow throws the error:

flow says identifier Component: Too few type arguments. Expected at least 1

in a few locations if class components don't have "<Props>" and/or "<State>" type arguments after the Component keyword and before the opening curly brace.

  • Other information

I've made the corrections in this #134 should you choose to add them to the project.

Cheers!

@Metnew
Copy link
Owner

Metnew commented Nov 11, 2017

Hello @marcbouchard,
Thank you for your feedback and interest :)
Flow team regularly change React API, sometimes even official Flow docs are incorrect. I'm going to review changes as soon as possible. Thanks for PRs!

@Metnew
Copy link
Owner

Metnew commented Nov 11, 2017

#134 was merged into dev. lines props: Props are unused, because we already defined Component<Props>. I'll fix it later and push from dev to master. Thanks for both good PRs :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants