Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

getInitialState doesn't merge return values #239

Closed
Stuk opened this issue Nov 11, 2016 · 1 comment
Closed

getInitialState doesn't merge return values #239

Stuk opened this issue Nov 11, 2016 · 1 comment

Comments

@Stuk
Copy link
Contributor

Stuk commented Nov 11, 2016

It is possible to have getInitialState implemented with React.createClass, and also have one (or more) mixins implement getInitialState as well.

React will merge the objects returned from all these functions, throwing an error if there are any duplicate keys.

Thanks for the cool project :)

@developit
Copy link
Member

Oooh - interesting, I didn't know that!

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

No branches or pull requests

2 participants