问题
This is the code: https://codesandbox.io/s/p90q6674qq
I simply use:
export default graphql(CURRENT_USER_QUERY)(Menu);
on the Menu
component and simply this code in App
component:
class App extends Component {
render() {
return (
<div>
{/* <Menu /> */}
<Route component={Menu} />
<Route exact path="/" component={Home} />
<Route path="/login" component={Login} />
</div>
);
}
}
A bug?
Where am I wrong?
来源:https://stackoverflow.com/questions/47733633/react-apollo-2-with-react-router-graphql-hoc-loading-true-forever-if-i-navigat