This is the first middleware built for Swidux. It's a simple logger which print action and updated Swidux's store in the console.
You just have to pass echo()
into the Store
init.
import Swidux
import SwiduxEcho
let store = Store<AppState>(
initialState: AppState(),
reducer: reducer,
middlewares: [ echo() ]
)
Add the following dependency to your Cartfile
:
github "clmntcrl/swidux-echo" ~> 0.2
Add the following pod to your Podfile
:
pod 'SwiduxEcho', '~> 0.2'
Add the package as dependency in your Package.swift
:
dependencies: [
.package(url: "https://github.com/clmntcrl/swidux-echo.git", from: "0.2.0"),
]
SwiduxEcho is released under the MIT license. See LICENSE for details.