9
9
![ badge] [ badge-linux ]
10
10
![ badge] [ badge-windows ]
11
11
![ badge] [ badge-mac ]
12
- [ ![ Slack chat] ( https://img.shields.io/badge/kotlinlang-%23redux-green?logo=slack&style=flat-square )] ( https://kotlinlang. slack.com/archives/C8A8G5F9Q )
12
+ [ ![ Slack chat] ( https://img.shields.io/badge/kotlinlang-%23redux-green?logo=slack&style=flat-square )] [ slack ]
13
13
[ ![ Dokka docs] ( https://img.shields.io/badge/docs-dokka-orange?style=flat-square&logo=kotlin )] ( http://reduxkotlin.github.io/redux-kotlin )
14
14
[ ![ Version maven-central] ( https://img.shields.io/maven-central/v/org.reduxkotlin/redux-kotlin?logo=apache-maven&style=flat-square )] ( https://mvnrepository.com/artifact/org.reduxkotlin/redux-kotlin/latest )
15
15
[ ![ Version maven-snapshot] ( https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Foss.sonatype.org%2Fcontent%2Frepositories%2Fsnapshots%2Forg%2Freduxkotlin%2Fredux-kotlin%2Fmaven-metadata.xml&logo=apache-maven&label=maven-snapshot&style=flat-square )] ( https://oss.sonatype.org/content/repositories/snapshots/org/reduxkotlin/redux-kotlin/ )
@@ -18,23 +18,29 @@ A redux standard for Kotlin that supports multiplatform projects.
18
18
19
19
Full documentation at http://reduxkotlin.org .
20
20
21
- ## Misson Statement
21
+ ## Mission Statement
22
22
23
- Provide a standard redux implementation for Kotlin. In doing so will foster a ecosystem of middleware, store
23
+ Provide a standard redux implementation for Kotlin. In doing so will foster a ecosystem of
24
+ middleware, store
24
25
enhancers, & dev tools. These core values will guide descisions for the project:
25
26
26
27
* core redux-kotlin will be a minimal implementation that other libraries can build upon
27
28
* modular development (follow example of https://github.com/reduxjs )
28
29
* support for all platforms supported by Kotlin multiplatform (JVM, iOS, Native, JS, WASM)
29
- * developed in open and enable discussion for all interested parties via open channels (slack, github, etc. TBD)
30
+ * developed in open and enable discussion for all interested parties via open channels (slack,
31
+ github, etc. TBD)
30
32
* not owned by a individual or company
31
33
32
- Redux in Kotlin, and in mobile in particular, may differ a bit from javascript. Many have found the basic pattern useful
33
- on Android & iOS leading to tens of opensource redux libraries in Kotlin, Java, and Swift, yet an ecosystem has yet to
34
- emerge. A port of javascript redux is a good starting point for creating a standard and will aid in cross-pollination of
34
+ Redux in Kotlin, and in mobile in particular, may differ a bit from javascript. Many have found the
35
+ basic pattern useful
36
+ on Android & iOS leading to tens of opensource redux libraries in Kotlin, Java, and Swift, yet an
37
+ ecosystem has yet to
38
+ emerge. A port of javascript redux is a good starting point for creating a standard and will aid in
39
+ cross-pollination of
35
40
middleware, store enhancers, & dev tools from the javascript world.
36
41
37
- Redux has proven helpful for state management in mobile. A multiplatform Kotlin implementation & ecosystem will increase
42
+ Redux has proven helpful for state management in mobile. A multiplatform Kotlin implementation &
43
+ ecosystem will increase
38
44
developer productivity and code reuse across platforms.
39
45
40
46
[ Droidcon NYC Slides] ( https://www.slideshare.net/PatrickJackson14/reduxkotlinorg-droidcon-nyc-2019 )
@@ -44,31 +50,35 @@ Video TBA
44
50
45
51
__ How to add to project:__
46
52
47
- Artifacts are hosted on maven central. They are published with gradle metadata, so you may need to enable
48
- with ` enableFeaturePreview("GRADLE_METADATA") ` in your settings.gradle file. For multiplatform, add the following to
53
+ Artifacts are hosted on maven central. They are published with gradle metadata, so you may need to
54
+ enable
55
+ with ` enableFeaturePreview("GRADLE_METADATA") ` in your settings.gradle file. For multiplatform, add
56
+ the following to
49
57
your shared module:
50
58
51
59
``` kotlin
52
60
kotlin {
53
61
sourceSets {
54
62
commonMain { // <--- name may vary on your project
55
63
dependencies {
56
- implementation(" org.reduxkotlin:redux-kotlin-threadsafe:0.5.5 " )
64
+ implementation(" org.reduxkotlin:redux-kotlin-threadsafe:_ " )
57
65
}
58
66
}
59
67
}
68
+ }
60
69
```
61
70
62
71
For JVM only:
63
72
64
73
``` kotlin
65
- implementation(" org.reduxkotlin:redux-kotlin-threadsafe-jvm:0.5.5 " )
74
+ implementation(" org.reduxkotlin:redux-kotlin-threadsafe-jvm:_> " )
66
75
```
67
76
68
77
* Non threadsafe store is available. Typical usage will be with the threadsafe
69
78
store. [ More info read here] ( https://www.reduxkotlin.org/introduction/getting-started )
70
79
71
- Usage is very similar to JS Redux and those docs will be useful https: // redux.js.org/. These docs are not an intro to
80
+ Usage is very similar to JS Redux and those docs will be useful https://redux.js.org/ . These docs
81
+ are not an intro to
72
82
Redux, and just documentation on Kotlin specific bits. For more info on Redux in general, check
73
83
out https://redux.js.org/ .
74
84
@@ -136,11 +146,13 @@ You then will have access to dispatch and subscribe functions from the `store`.
136
146
__ Create a synchronized store__
137
147
138
148
``` kotlin
139
- val store = createThreadSafeStore(reducer, AppState (user, listOf ()), applyMiddleware(loggingMiddleware))
149
+ val store =
150
+ createThreadSafeStore(reducer, AppState (user, listOf ()), applyMiddleware(loggingMiddleware))
140
151
```
141
152
142
- Access to `store` methods like `dispatch` and `getState` will be synchronized. Note : if using a thread safe store with
143
- enhancers or middleware that require access to store methods, see usage below.
153
+ Access to ` store ` methods like ` dispatch ` and ` getState ` will be synchronized. Note: if using a
154
+ thread safe store with enhancers or middleware that require access to store methods, see usage
155
+ below.
144
156
145
157
__ Create a synchronized store using an enhancer__
146
158
@@ -155,19 +167,27 @@ val store = createStore(
155
167
)
156
168
```
157
169
158
- Access to `store` methods like `dispatch` and `getState` will be synchronized, and enhancers (eg. `applyMiddleware`)
159
- that are placed above `createSynchronizedStoreEnhancer` in the enhancer composition chain will receive the synchronized
160
- store.
170
+ Access to ` store ` methods like ` dispatch ` and ` getState ` will be synchronized, and enhancers (
171
+ eg. ` applyMiddleware ` ) that are placed above ` createSynchronizedStoreEnhancer ` in the enhancer
172
+ composition chain will receive the synchronized store.
161
173
162
- ## Communication
174
+ ## Extensions
163
175
164
- Want to give feedback, contribute, or ask questions ?
176
+ Here's a list of optional extensions available. Raise an issue to add yours!
165
177
166
- __ \#redux__ slack channel in [kotlinlang](https: // kotlinlang.slack.com)
178
+ - [ redux-kotlin-thunk] ( https://github.com/reduxkotlin/redux-kotlin-thunk )
179
+ - [ redux-kotlin-compose] ( https://github.com/reduxkotlin/redux-kotlin-compose )
180
+ - [ presenter-middleware] ( https://github.com/reduxkotlin/presenter-middleware )
167
181
168
- Trello boards - https : // trello.com/reduxkotlinorg
182
+ ## Communication
169
183
170
- Or create an issue on [github](https: // github.com/reduxkotlin/redux-kotlin/issues).
184
+ Want to give feedback, contribute, or ask questions?
185
+
186
+ - Chat on [ #redux] [ slack ] slack channel
187
+ - Use [ Trello boards] ( https://trello.com/reduxkotlinorg )
188
+ - Raise GitHub [ issues] ( https://github.com/reduxkotlin/redux-kotlin/issues )
189
+ - Ask questions on
190
+ GitHub [ discussions] ( https://github.com/reduxkotlin/redux-kotlin/discussions/categories/q-a )
171
191
172
192
[ badge-android ] : http://img.shields.io/badge/platform-android-brightgreen.svg?style=flat
173
193
@@ -184,3 +204,5 @@ Or create an issue on [github](https://github.com/reduxkotlin/redux-kotlin/issue
184
204
[ badge-windows ] : http://img.shields.io/badge/platform-windows-informational.svg?style=flat
185
205
186
206
[ badge-mac ] : http://img.shields.io/badge/platform-macos-lightgrey.svg?style=flat
207
+
208
+ [ slack ] : https://kotlinlang.slack.com/archives/C8A8G5F9Q
0 commit comments