question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to Add a Route to RSK?

See original GitHub issue

I am having trouble adding a new page/route to RSK. I have started with the current head (310bb5d), and done these steps:

  1. Duplicate the routes/contact folder, and rename it to ‘grumble’.
  2. Rename the file names to Grumble.css and Grumble.js
  3. Edit Grumble.js: s/Contact/Grumble/g
  4. Edit index.js: change path to ‘/grumble’, and s/Contact/Grumble/g
  5. Edit routes/index.js to import grumble from './grumble'; and to add grumble, to the end of the children list

npm run start opens the browser to the home page at localhost:3001 localhost: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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
richb-hanovercommented, Jul 19, 2016

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 error listed below content? Thanks!

0reactions
ulanicommented, May 27, 2021

@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 main branch has been updated with React Starter Kit v2, using JAM-style architecture.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 10 in Telugu #25 Route Parameters in ... - YouTube
In this video we will discuss about how to send parameters in the URL , read them in another component and display it....
Read more >
How to Configure Metamask to Connect to the RSK Networks
Wondering how to add a custom network, and configure Metamask to connect to the RSK test network? In this short tutorial, you will...
Read more >
Angular 10 in Telugu #29 Child Routes in #Angular10 in Telugu
In this video we will discuss about Child Routes in Angular-10 in Telugu.This is World FIRST CHANNEL in ... RSK Helpline. RSK Helpline....
Read more >
RSK Helpline Intro - YouTube
RSK Helpline Intro.#RSKHelpline. ... Add a comment. ... #Angular 10 in Telugu #25 Route Parameters in Angular 10 in Telugu || RSK Helpline....
Read more >
#Angular 10 in Telugu #23 Routing and Navigation ... - YouTube
In this video we will discuss about Routing and Navigation in Angular-10 in Telugu.This is World FIRST CHANNEL in YOUTUBE which dealing ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found