{"library":"redux-elm-middleware","title":"redux-elm-middleware","description":"Elm middleware for Redux that enables using Elm reducers within a Redux/React app. Version 4.0.0 is stable but appears to be in maintenance mode with no recent updates. It allows embedding Elm business logic in a Redux store, handling state and effects purely via Elm's update function while keeping access to the React/Redux ecosystem. Alternatives: use Elm directly for the whole app or use port-based communication without this middleware.","language":"javascript","status":"maintenance","last_verified":"Sat May 09","install":{"commands":["npm install redux-elm-middleware"],"cli":null},"imports":["import createElmMiddleware from 'redux-elm-middleware'","import { reducer } from 'redux-elm-middleware'","import Redux from 'redux-elm-middleware/src/Redux.elm' (or via elm-package.json source-directories)"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import createElmMiddleware from 'redux-elm-middleware';\nimport { reducer as elmReducer } from 'redux-elm-middleware';\nimport { createStore, combineReducers, applyMiddleware, compose } from 'redux';\nimport Elm from '../build/elm';\n\nconst rootReducer = combineReducers({\n  elm: elmReducer,\n  // ... other reducers\n});\n\nconst elmStore = Elm.Reducer.worker();\nconst { run, elmMiddleware } = createElmMiddleware(elmStore);\n\nconst store = createStore(\n  rootReducer,\n  {},\n  compose(\n    applyMiddleware(elmMiddleware),\n    window.devToolsExtension ? window.devToolsExtension() : f => f\n  )\n);\n\nrun(store);","lang":"javascript","description":"Configures Redux store with elm middleware, creates an Elm worker, and runs the middleware to connect Elm's state to Redux.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}