-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to Add a Route to RSK? #754
Comments
Update: The files look like this: routes/index.js
routes/grumble/index.js
routes/grumble/Grumble.js
|
content route handles all paths, so you need to put your route before it children: [
// put your routes here...
content,
], |
Ahah. That did the trick! All my (own) routes must appear above "content", so routes.index.js is now: ...
import error from './error';
import grumble from './grumble';
export default {
path: '/',
children: [
home,
contact,
login,
register,
grumble, // add the new route *above* the 'content' and 'error' entries in the list
content, // these two must be last
error, // these two must be last
],
... A new question: why is |
Appreciate the work. We could really use the How To for routing to have some more content. For those of us who are relatively new, this is seriously confusing. Is there any chance this could get shifted over to the Docs for general use? |
I issued a PR for a placeholder page to update the How to Implement Routing page: |
thanks riche-hanover! I put my route over the "content" And resolve the problem |
Im deploying my app to heroku
it says My order is this
Any clues or help is appreciated |
Should I open an issue for that @langpavel ? |
@upq Yes, it is different problem, isn't it? |
@richb-hanover thank you very much for crating this issue! Unfortunately, we have close it due to inactivity. Feel free to re-open it or join our Discord channel for discussion. NOTE: The |
I am having trouble adding a new page/route to RSK. I have started with the current head (310bb5d), and done these steps:
s/Contact/Grumble/g
s/Contact/Grumble/g
import grumble from './grumble';
and to addgrumble,
to the end of thechildren
listnpm run start
opens the browser to the home page at localhost:3001localhost:3001/contact gives the contact page
localhost:3001/grumble gives a blank page, instead of a copy of the Contact page.
What else do I need to do? Thanks.
The text was updated successfully, but these errors were encountered: