Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

redux template: automatically infer FetchData's new props type #1250

Closed
wants to merge 1 commit into from
Closed

redux template: automatically infer FetchData's new props type #1250

wants to merge 1 commit into from

Conversation

stephtr
Copy link
Contributor

@stephtr stephtr commented Sep 2, 2017

After being connected to redux's store the props type isn't the same anymore since WeatherForecastsState gets filled by the store.

The template worked because when using the FetchData component within the Route component it seems like its type doesn't get checked accurately. However using the component as <FetchData ... /> generates an error since the properties of WeatherForecastsState were seemingly missing.

The type definition of redux's connect has been built in such a way, that the new props type gets automatically infered.

@SteveSandersonMS
Copy link
Member

Thanks for submitting this PR! As it happens, the next version of the React-Redux template will be based around create-react-app output and this change won't be applicable to it (nor will the original issue). I'll close this because it doesn't apply to the newer template. Hope that's OK!

@stephtr stephtr deleted the patch-1 branch November 14, 2017 23:13
@stephtr
Copy link
Contributor Author

stephtr commented Nov 14, 2017

That is nice to hear!

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

Successfully merging this pull request may close these issues.

3 participants