Skip to content
Advertisement

Tag: react-router

Make page only accessible if logged in – React

Hello, please I,m a beginner in react. and I need help in knowing how to approach this challenge in the snippet above, is my homepage. my goal now is to make only explore and tour components to visible when user is logged out. so when the users visit the homepage the components will be displayed but when logged in, the

I can’t display nested route in different view

I’ve been trying to display a component in a different view from the parent component but what I get is the two components displayed in the same view, first parent component, and right below, child component when the Link is clicked. It’s a simple shopping cart (/cart) and after clicking Pay you should be redirected to checkout (/cart/checkout) view, nevertheless

req.query is empty and req.url is not complete using react router and express

When the page URL is http://localhost:3000/verify?token=something and I make a GET request using fetch, when I hit the server, req.url is “/verify” instead of “verify?token=something”, also the req.query object is empty The client is running on port 3000 and the server on port 5000. I’m using a proxy in package.json on the client-side. Have been scratching my head for some

send id (or get id from router path)

I got simple blog (react/redux) (only frontend part). With user registration and articles. And stuck when tryed to send id to editor. I have same form, but different path for add new and for edit existing article: it might be simple but I have no idea how to send(or get) id to ArticleEditor component to fill form. Plz help if

Advertisement