Hi there... I am still new with routing in react. Just wanna ask. am i doing this right?
So I have some features that each one has their own CRUD urls (like to see list, create new item, etc). But I am trying to seperate each feature to have its own main routes. So here's what I did to do it:
here's how i create url routes for feature called 'user' and 'member'
user-routes.jsx
import React, { Component } from 'react';
import {Router, Route, browserHistory, hashHistory} from 'react-router'
import {User} from 'pages'
class UserRoutes extends Component {
constructor(props) {
super(props);
}
And every time I click a link, it will be handled from the main-route, but it keeps giving this error whenever I click the links
![](http://g.recordit.co/CAMPl7gznp.gif)
I still thinks it won't harm me any further, but I can't ignore it.
Any response would be really great~
Hi there... I am still new with routing in react. Just wanna ask. am i doing this right? So I have some features that each one has their own CRUD urls (like to see list, create new item, etc). But I am trying to seperate each feature to have its own main routes. So here's what I did to do it:
here's how i create url routes for feature called 'user' and 'member'
class UserRoutes extends Component { constructor(props) { super(props); }
}
export default UserRoutes;
and I create a main route to combine those routes with this
class MainRoute extends Component { constructor(props) { super(props); }
}
export default MainRoute;