acdlite / acdlite/redux-router

Failed to do dynamic loading with redux-router

Ouverte
#284 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
2.3k
Forks
194
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

## Version
2.1.2
## Steps to reproduce
Create a router like below:

```javascript
const rootRouter = {
childRoutes:[{
path:'/root',
component:MainEntry,
childRoutes: [
require('../containers/main_entry')
]
}]
}

return

{rootRouter}

```

but when loading the page, I got below error:

Objects are not valid as a React child (found: object with keys {childRoutes}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons.

## Expected Behavior

## Actual Behavior

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Look at the examples in the repository to understand how redux-router expects routes to be structured. The error suggests a route object is being passed incorrectly as a React child. Check the Router and ReduxRouter components in the source code to see how childRoutes should be handled. Verify the dynamic loading pattern by examining similar issues or the test suite.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, react, redux
Domaine
frontend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.