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

The item of the PickerIOS #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

lulutia
Copy link
Contributor

@lulutia lulutia commented Jun 3, 2016

fix the warning:
React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components).

@RealOrangeOne
Copy link
Owner

Nice. Can you implement it in the same way TabBarIOS is though, to keep the implementation the same as the rest of the library.

@lulutia
Copy link
Contributor Author

lulutia commented Jun 4, 2016

I tested the implementation now you use in the TabBarIOS, it throws the warnings as well, but not for the TabBarIOS.Item, but for the TabBarIOS itself.
I changed it as follows, then it will be fine

const ReactNative = {
...
Picker: createMockComponent('Picker'),
TabBarIOS: createMockComponent('TabBarIOS'),
...
}
ReactNative.PickerIOS.Item = createMockComponent('PickerIOS.Item');
ReactNative.TabBarIOS.Item = createMockComponent('TabBarIOS.Item');

@RealOrangeOne
Copy link
Owner

hmm, weird it doesnt like that, but i'm still not entirely happy with this implementation. Could you maybe add the 'Item' component as a static attribute of the PickerIOS?

@feyy
Copy link
Contributor

feyy commented Jun 6, 2016

It's indeed a static attribute. I dot' understand your destruction declare, only copy the attributes without the constructor self.

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

Successfully merging this pull request may close these issues.

3 participants