@stackhouseos/flower-client
TypeScript icon, indicating that this package has built-in type declarations

1.5.11 • Public • Published

Flower client lib

Libreria per la visualizzazione del flower nel progetto, basato sugli elements generati dal builder

Setup rapido Redux toolkit

import { combineReducersWithFlower, flowerEnhancer } from '@stackhouseos/flower-client'

const store = configureStore({
  reducer: combineReducersWithFlower({...reducersList}),
  enhancers: [flowerEnhancer()],
})

Con sagas custom

import { combineReducersWithFlower, flowerEnhancer } from '@stackhouseos/flower-client'

const store = configureStore({
  reducer: combineReducersWithFlower({...reducersList}),
  enhancers: [flowerEnhancer([appSaga()])],
})

Setup su progetto esistente

Integrazione su redux e redux-saga già configurati nel progetto

Aggiungi ai tuoi reducer il flower

import { flowerReducer } from '@stackhouseos/flower-client'

export default combineReducers({
  flower: flowerReducer,
  ...reducers
})

Aggiungi alle tue saghe

import { flowerSaga } from '@stackhouseos/flower-client'

export default function* root() {
  yield all(
    [
      flowerSaga(),
      ...sagas
    ]
  )
}

Esempio

import Flower from '@stackhouseos/flower-client'

<Flower 
  elements={[/*elements from flower builder*/]} 
  name={'login'} 
  reducerName={`users`}
 />

CurrentNode.js

Props

flowName
  • required: true
  • type: string
reducerName
  • required: false
  • type: string
prefix
  • required: true
  • type: string
parentFlow
  • required: false
  • type: string

Flower.js

FlowerClient

Props

elements
  • required: false
  • type: instanceOf

Elementi come da export del builder.

name
  • required: false
  • type: string

Nome del flower, es. login

startId
  • required: false
  • type: string

Nome del flower, es. login

reducerName
  • required: false
  • type: string

Nome del nodo di partenza

parentFlow
  • required: false
  • type: string

Nome flower che contiene questo flower,

reloadKey
  • required: false
  • type: any
extraContext
  • required: false
  • type: instanceOf
destroyOnUnmount
  • required: false
  • type: bool

/@stackhouseos/flower-client/

    Package Sidebar

    Install

    npm i @stackhouseos/flower-client

    Weekly Downloads

    4

    Version

    1.5.11

    License

    ISC

    Unpacked Size

    193 kB

    Total Files

    29

    Last publish

    Collaborators

    • stackhouseos