Closed sourav3 closed 7 years ago
I have the following route config. import HomePage from '../components/HomePage'; import About from '../components/About'; import SinglePost from '../components/SinglePost';
export default { home: { path: '/home', method: 'get', page: 'homePage', title: 'Reditt', handler: HomePage }, about: { path: '/about', method: 'get', page: 'about', title: 'About', handler: About }, dynamicPost: { path: '/posts/:postId', method: 'get', page: 'Post', title: 'Post', handler: SinglePost } };
How do I get the parameter postId in SinglePost component ?
I have the following route config. import HomePage from '../components/HomePage'; import About from '../components/About'; import SinglePost from '../components/SinglePost';
export default { home: { path: '/home', method: 'get', page: 'homePage', title: 'Reditt', handler: HomePage }, about: { path: '/about', method: 'get', page: 'about', title: 'About', handler: About }, dynamicPost: { path: '/posts/:postId', method: 'get', page: 'Post', title: 'Post', handler: SinglePost } };
How do I get the parameter postId in SinglePost component ?