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.

RouterEventType is no longer exported?

See original GitHub issue

Previsouly you could do a

import { RouterEventType } from 'crayon/types'

This no longer works. Where is it exported now?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
aigrcommented, Sep 24, 2019

But other things have changed as well.

If I have something like

nav.path('/browse/:cname', (req, res) => {
  const sub = nav.events.subscribe(event => {
    // if (event.type === RouterEventType.ProgressEnd) {
    if (event.type === 'ROUTER_END') {
      res.mount(Collection, { req, nav })
    }
  })
  res.onLeave(() => sub.unsubscribe())
})

Then previously a call to nav.navigate('/browse/foo'), while “being” on '/browse/bar' worked out. Now I need to click links twice for it to flip.

0reactions
alshdavidcommented, Dec 2, 2019

RouterEventType is now exported on the default crayon export

You can check out this sandbox https://codesandbox.io/s/svelte-khjjw?fontsize=14&hidenavigation=1&theme=dark

I’ll be enhancing the documentation soon, but for now to access RouterEventType do the following:

import crayon from 'crayon'

console.log(crayon.RouterEventType.ProgressStart)

Let me know if you have any issues, otherwise I’ll close this issue for now

Read more comments on GitHub >

github_iconTop Results From Across the Web

What causes the typescript Module has no exported member ...
What I have read a couple times and have tried to do is install the type definitions (I think?) like this: yarn add...
Read more >
export 'Routes' was not found in '@angular/router' · Issue #3547
I have the import statement and can (CTRL + Click) to navigate directly to the exported declaration: export declare type Routes = Route[];....
Read more >
Event - @angular/router
Router events that allow you to track the lifecycle of the router. See more... type Event = RouterEvent | NavigationStart | NavigationEnd |...
Read more >
Smart Licensing Using Policy for Cisco Enterprise Routing ...
Enforcement type for the license. This may be one of the following: Enforced. Not enforced. Export Restricted (same as export-controlled).
Read more >
What's new in Angular 14? - Ninja Squad
export const ROUTES: Routes = [ { path: '', title: 'Ninja Squad | Home', ... For example, all router events now have a...
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