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 handle rest urls (Step path)

See original GitHub issue

Hi, Is it possible to use rest url as value of path?

<Step path="merlin/idValue">
 <Merlin />
</Step>`

or I have to change code like this? (components/Wizard.jsx)

    componentWillMount() {
      this.unlisten = this.history.listen(({ pathname }) => {
      // const path = pathname.split('/').pop();
      let path = pathname.split('/').splice(2).join('/');
      const step = this.steps.filter(s => s.path === path)[0];
      if (step) {
        this.setState({
          step,
        });
      }
     });
    }

Instead of take last part of pathname I take last parts (skiping 2 firsts). Pls, suggest me

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
RusinovAntoncommented, Nov 13, 2018

Hi @crosscompile. I think I have similar question. My routing looks like this /home/operation/:operationId/<step-name> For example, I can have following URLs:

/home/operation/create/step-1 - for new operation /home/operation/32/step-1 - for edit operation

I have trouble understanding how to make it work with Steps

0reactions
khumphreycommented, Jul 31, 2019

I have the same question. If I have a fork in my steps - one for create and one for use existing that have different screens that need to be shown… I’m having trouble making it work with Steps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Defining Paths for a REST API - IBM
If you have not previously pinned the UI navigation pane then click the Navigate to icon · Click Drafts in the UI navigation...
Read more >
Best practices for REST API design - Stack Overflow Blog
Best practices for REST API design · Accept and respond with JSON · Use nouns instead of verbs in endpoint paths · Name...
Read more >
Customize REST URLs - OutSystems 11 Documentation
Customize REST URLs · In the Logic tab, open the Integrations folder. · Expand the REST API and select the method you want...
Read more >
Understanding And Using REST APIs - Smashing Magazine
How and why to use REST APIs, how to deal with headers, error messages and API ... The endpoint (or route) is the...
Read more >
Tutorial: Build a REST API with HTTP non-proxy integration
In the Setup pane, choose HTTP for Integration type and choose GET for HTTP method. For Endpoint URL, type http://petstore-demo-endpoint.execute-api.com/ ...
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