0.0.8 • Published 5 years ago

@wethecurious/curios-reduxmiddleware-analytics v0.0.8

Weekly downloads
1
License
MIT
Repository
-
Last release
5 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

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago