0.0.8 • Published 6 years ago

@wethecurious/curios-reduxmiddleware-analytics v0.0.8

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

CURIOS MIDDLEWARE REDUX SERIAL

Rationale

This middleware will establish a connection an mqtt connection to the analytics database to allow actions to be logged

If not connected to mqtt it will fall back to a non functional stub which will simulate action dispatches

Installation

npm i -s @wethecurious/curios-redux-middleware-analytics

At your createStore

import { createAnalyticsMiddleware } from 'redux-middleware-analytics'

const mqttMiddleware = createAnalyticsMiddleware({
    app: string,
    mqttBroker: 'localhost:1883'
})

const store = createStore(
  reducer,
  applyMiddleware(mqttMiddleware)
)

store.dispatch('@@CURIOS_INIT') // this is the desfault action which tells the analytics to attempt to connect
0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago