-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Labels
Description
How to add stormpath with React PropTypes?
index.js
import App from '../components/App';
import WelcomeRoute from './Welcome';
import SettingsRoute from './Settings';
import CampaignRoute from './Campaign';
export default {
path: '/',
component: App,
indexRoute: WelcomeRoute,
childRoutes: [
SettingsRoute,
CampaignRoute
]
};
App.js
import React, {PropTypes} from 'react';
import Header from '../../components/Header';
import MessagesStack from '../../components/MessagesStack'
const App = ({children}) => (
<div>
<Header />
<section className="ui main container">
<MessagesStack />
{children}
</section>
</div>
);
App.propTypes = {
children: PropTypes.element.isRequired
};
export default App;
I tried to change Router to react-stormpath but it now gives me a blank page.