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.

Feature request: abstract states

See original GitHub issue

While trying to build a custom framework around router5, heavily utilizing the implementation of nested states, I’ve found myself in need of abstract states - state that has optional path and can’t be navigated to, but trigger relevant events and can be used in custom pipeline.

For instance - I’ve got two layout pages public and private. These would both trigger their events when transitioning from one child state to another (or just be used in custom pipeline), but there would be no way to navigate to them directly.

.addAbstractNode('public')                      // abstract state without url
.addAbstractNode('public.account', '/account')  // abstract state with url (for inheritance to child states)
.addNode('public.account.signIn', '/sign-in')   // normal state

.addAbstractNode('private')                     // abstract state without url
.addNode('private.home', '/')                   // normal state

Such instance would only allow going to / and /account/sign-in.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
trochcommented, Nov 2, 2015

I think I will split that work into two features:

  • abstract states (states which cannot be activated, but children can)
  • path-less states (states without a defined path)

an abstract state can be path-less or not. A path-less state can be abstract or not.

0reactions
trochcommented, Jul 3, 2017

@LeonardoGentile worked as expected for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

What Is a Feature Request? Definition and Examples
A feature request is a comment, message, or ask from a user to implement a specific feature into your product. ... State clearly...
Read more >
Introducing Review Requests and Comment History
With Review Requests, you now have a clear and straightforward way to signal when you're ready to kick off the review process and...
Read more >
Abstract States, Non-Abstract Parent States and Default ...
I'm getting the notion that we need to look at this feature more deeply. What is its exact purpose that makes it unique...
Read more >
A Survey of User Feature Requests Analysis and Processing
Abstract : Feature requests are enhancements for existing features or requests for new features proposed by end users on the open forums, ...
Read more >
How do I request my driver abstract or motor vehicle history?
Use the "Michigan Department of State-Requesting Your Own Record" form, and select "Driving Record." Click here for more instructions. Minnesota ...
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