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

[prop-types] Allow object as type for root.Root (Fixes #1446) #1461

Merged
merged 14 commits into from
Aug 7, 2018

Conversation

JonnyBurger
Copy link
Contributor

Summary

Removes two warnings you get in React Native 0.56.
now uses React.forwardRef() (exact commit in react-native 0.56: facebook/react-native@3e534b9)

Therefore:

import {View} from 'react-native';
console.log(typeof View) // 'object'

This PR adds support for that.

Result

Two warnings disappear.
Fixes #1446

@algobot
Copy link
Contributor

algobot commented Jul 27, 2018

Deploy preview for react-instantsearch ready!

Built with commit ebca14c

https://deploy-preview-1461--react-instantsearch.netlify.com

@Haroenv Haroenv requested a review from samouss July 27, 2018 14:34
@Haroenv
Copy link
Contributor

Haroenv commented Jul 27, 2018

Thanks, seems to be a long list now, I wonder if what we're using this for satisfies PropTypes.element; Not sure if that includes the string

@JonnyBurger
Copy link
Contributor Author

Tried it out quickly and it seems like PropTypes.element is not satisfied with View.

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct, but leaving it up to @samouss (currently on holiday) to validate and merge. Thanks a lot!

@samouss
Copy link
Collaborator

samouss commented Aug 6, 2018

Thanks for the fix, I will merge it as it is. There is an ongoing discussion to support forwardRef directly in the PropTypes package. Will follow how the discussion evolve and we might revert the changes depending on the outcome. Thanks again!

@samouss samouss merged commit 7c2317b into algolia:master Aug 7, 2018
@JonnyBurger
Copy link
Contributor Author

Thanks a lot!
When can I expect this to be released?

@samouss
Copy link
Collaborator

samouss commented Aug 9, 2018

Probably beginning of next week.

samouss added a commit that referenced this pull request 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

Successfully merging this pull request may close these issues.

None yet

4 participants