acdlite / acdlite/flummox

Make flux key configurable for FluxComponent

Abierto
#60 5 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement outdated
Lenguaje dominante
JavaScript
Estrellas
1.7k
Forks
109
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

FluxComponent and fluxMixin use the key `flux` for passing the Flux instance via props and context. This is a natural default, but it should be configurable to enable multiple Flux instances to be used without clashing — for example, if a Flummox instance is used locally by a component, or as part of a library.

API would look something like this:

``` js


// this.props.flux === fluxA && this.props.flummox === fluxB

```

(Props passing is nice, but this is more important for preventing context clashes. In this example, descendants of InnerComponent have context `flux` and `flummox`)

The API for fluxMixin would be a bit trickier. The current args for `fluxMixin()` are the same as the args for `connectToStores()`, so it would be weird to add another arg. For this reason, I'm thinking this feature should be exclusive to FluxComponent. Also, I don't think people should use fluxMixin anyway... it only exists in the first place because I know some people are stubborn and will insist on the mixin form :)

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.