Objects are not valid as a React child (found: object with keys {style, title}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of View.
I don't know what to make of the trace I've pasted, because it's not in my code at all. Any ideas would be greatly appreciated! Thanks.
index.ios.js
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Navigator
} from 'react-native';
import Product from './product.js';
import Services from './services.js';
import ProductsList from './productslist.js';
import AddProduct from './addProduct.js';
import {StackNavigator} from 'react-navigation';
const routes = [
{
title : 'Services',
renderFunc : (navigator) => <Services navigator={navigator} />
},
{
title : 'Marketplace',
renderFunc : (navigator) => <ProductsList navigator={navigator}/>
}
];
const stackNavigatorRoutes = {
Services : {
screen : Services,
},
ProductsList : {
screen : ProductsList
},
Product : {
screen : Product
},
AddProduct : {
screen : AddProduct
}
};
const AppNavigator = StackNavigator({
...stackNavigatorRoutes,
},
{
initialRouteName : 'Services',
navigationOptions : {
header : {
style : {
height : 60,
backgroundColor : 'cadetblue'
},
title : 'ResiShare'
}
}
});
class Rs extends Component {
render() {
return (
<AppNavigator />
// <ProductsList />
// <AddProduct />
);
}
}