q3e / react-native-github-graphql-app

React Native App that searches github projects and their contributors[WIP]
MIT License
2 stars 0 forks source link

How to pass props between screens #4

Closed q3e closed 6 years ago

q3e commented 6 years ago

passing props between components is not as straight forward as in react-dom

This helped https://github.com/react-community/react-navigation/issues/740#issuecomment-297856693

This is my fix https://github.com/bnovf/react-native-github-graphql-app/commit/cf9fdb367c17fb8af6f25495adef637fa4667618

and it should console log the props in the required screen. awesome!

Whats left is to tie this prop to the search input as the search query for graphql to consume

q3e commented 6 years ago

console logging the searchQuery prop returns a class. expected a string, which is the value of that prop

https://stackoverflow.com/questions/44636886/react-native-how-to-pass-props-navigating-from-one-screen-to-another

q3e commented 6 years ago

https://github.com/bnovf/react-native-github-graphql-app/commit/5ca751dbb2aff72c55c4d8c41966c72fe80e46f2 fixes this stupid issue

q3e commented 6 years ago

fixed this stupid issue(again) https://github.com/bnovf/react-native-github-graphql-app/commit/2f9fca25aa6fb6156df9ec2d6aefb87319850611