Skip to content

Commit 308ff17

Browse files
author
Patrick Jackson
committed
clean up
1 parent 8ab6ebb commit 308ff17

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed

common/build.gradle

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ kotlin {
2222
}
2323
compilations.main.extraOpts "-Xobjc-generics"
2424
}
25-
26-
// fromPreset(presets.iosArm64, 'ios') {
27-
// binaries {
28-
// framework('common')
29-
// }
30-
// }
31-
3225
}
3326
sourceSets {
3427
commonMain {
Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,8 @@
11
package com.example.common
22

3-
import org.reduxkotlin.Reducer
4-
import org.reduxkotlin.createStore
53

64
val helloWordText = "Hello Kotlin MP"
75

8-
data class AppState(val count: Int = 0)
96

10-
class ButtonTap
11-
12-
val reducer: Reducer<AppState> = {state, action ->
13-
when (action) {
14-
is ButtonTap -> state.copy(count = state.count + 1)
15-
else -> state
16-
}
17-
}
18-
19-
val store = createStore(reducer, AppState())
20-
21-
data class MainViewState(val counterText: String)
22-
23-
fun AppState.toMainViewState() = MainViewState(count.toString())
247

258

iOS/KmpStarterSwiftUi/KmpStarterSwiftUi/ContentView.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import common
1111

1212
struct ContentView: View {
1313
var body: some View {
14-
let txt = KmpStarterAppKt.store.state!.toMainViewState().counterText
15-
return Text(txt)
14+
return Text(KmpStarterAppKt.helloWordText)
1615
}
1716
}
1817

0 commit comments

Comments
 (0)