vuejs/vue-router

Throw exception or provide info message when route's component is null

Geschlossen

#2.038 geöffnet am 31.01.2018

 (9 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (5.092 Forks)batch import
contribution welcomefeature requestgood first issue

Repository-Metriken

Stars
 (19.015 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

What problem does this feature solve?

Currently, route's component can be null and it give no information and error. Provide information or raising error can help users to catch they have some import issues when they use

import * as components from './components'

export default [
  {
    path: '/accounts',
    component: components.AccountsListView,
    name: 'accountsListView'
  },
  {
    path: '/accounts/create',
    component: components.CreateEditAccounts,
    name: 'createAccounts'
  }
]

So if components.CreateEditAccounts is null, they will know what went wrong easier.

What does the proposed API look like?

Raise error when component is null or log info message.

Contributor Guide