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

Failed prop type: Invalid prop root.Root warning #1446

Closed
mxmzb opened this issue Jul 18, 2018 · 6 comments
Closed

Failed prop type: Invalid prop root.Root warning #1446

mxmzb opened this issue Jul 18, 2018 · 6 comments

Comments

@mxmzb
Copy link

mxmzb commented Jul 18, 2018

example code causing the issue:

(taken from https://community.algolia.com/react-instantsearch/Getting_started_React_native.html#add-the-%3Cinstantsearch%3E-component)

<InstantSearch appId="latency" apiKey="6be0576ff61c053d5f9a3225e2a90f76" indexName="ikea">
    <Text>Congrats 🎉! Your application is now connected to Algolia!</Text>
</InstantSearch>

Bug: What is the current behavior?

Warning is being thrown:

Warning: Failed prop type: Invalid prop `root.Root` supplied to `CreateInstantSearch`.
    in CreateInstantSearch (at Search.js:21)
    ... further stack incoming

Bug: What is the expected behavior?

No warning I guess? However, the search still works, it's just a warning, not an error.

Bug: Which versions?

[email protected], [email protected], [email protected]

@rossvz
Copy link

rossvz commented Jul 24, 2018

I noticed this when upgrading to [email protected]

@Haroenv
Copy link
Contributor

Haroenv commented Jul 27, 2018

Hmm, that prop type seems to be correct, I wonder where that error is coming from. Thanks for reporting. This is indeed just a warning though, so can safely be ignored by you

@JonnyBurger
Copy link
Contributor

View now uses React.forwardRef. That means it's type is an object.

Made a Pull Request which explains it: #1461.

Thanks for merging!

@Haroenv
Copy link
Contributor

Haroenv commented Jul 27, 2018

thanks @JonnyBurger, I missed some context there, your PR looks good ❤️

@mxmzb
Copy link
Author

mxmzb commented Aug 9, 2018

thank you so much for fixing this guys, i sincerely appreciate your effort! i'd have another request, could you please publish the next version with this fix asap? i am experiencing currently a few different issues that i hope this fix might have corrected, but i am not sure yet.

i actually wanted to build from the github master myself, but also ran into some issues here with babel and had no time to look into it so that's why i am asking for a version bump (thank you so much)!

@samouss
Copy link
Collaborator

samouss commented Aug 10, 2018

The next version will be released beginning of next week.

samouss added a commit that referenced this issue Aug 16, 2018
<a name="5.2.3"></a>
## [5.2.3](v5.2.2...v5.2.3) (2018-08-16)

### Bug Fixes

* Allow object as type for Root (closes [#1446](#1446)) ([#1461](#1461)) ([7c2317b](7c2317b))
* **List:** render children list only when required ([#1472](#1472)) ([9eb2cbb](9eb2cbb)), closes [#1459](#1459)
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

5 participants