You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/koin-annotations/definitions.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Definitions with Annotations
3
3
---
4
4
5
5
6
-
Koin Annotations allow to declare the same kind of definitions as the regular Koin DSL, but with annotations. Just tag your class with the needed annotation, and it will generate everything for you!
6
+
Koin Annotations allows to declare the same kind of definitions as the regular Koin DSL, but with annotations. Just tag your class with the needed annotation, and it will generate everything for you!
7
7
8
8
For example the equivalent to `single { MyComponent(get()) }` DSL declaration, is just done by tagging with `@Single` like this:
9
9
@@ -20,9 +20,9 @@ Koin Annotations keep the same semantic as the Koin DSL. You can declare your co
20
20
21
21
For Scopes, check the [Declaring Scopes](/docs/reference/koin-core/scopes.md) section.
22
22
23
-
### Generate Compose ViewModel for Kotlin Multipaltform (since 1.4.0)
23
+
### Generate Compose ViewModel for Kotlin Multiplatform (since 1.4.0)
24
24
25
-
The `@KoinViewModel` annotation can be used to generate either Android or Compsoe KMP ViewModel. To generate `viewModel` Koin definition with `org.koin.compose.viewmodel.dsl.viewModel` instead of regular `org.koin.androidx.viewmodel.dsl.viewModel`, you need to activate the `KOIN_USE_COMPOSE_VIEWMODEL` option:
25
+
The `@KoinViewModel` annotation can be used to generate either Android or Compose KMP ViewModel. To generate `viewModel` Koin definition with `org.koin.compose.viewmodel.dsl.viewModel` instead of regular `org.koin.androidx.viewmodel.dsl.viewModel`, you need to activate the `KOIN_USE_COMPOSE_VIEWMODEL` option:
26
26
27
27
```groovy
28
28
ksp {
@@ -35,7 +35,7 @@ ksp {
35
35
:::
36
36
37
37
:::note
38
-
Koin 4.0 should bring merge of those 2 ViewModel DSL into only one, as the ViewModel type argiument comes from teh same library
38
+
Koin 4.0 should bring merge of those 2 ViewModel DSL into only one, as the ViewModel type argiument comes from the same library
39
39
:::
40
40
41
41
## Automatic or Specific Binding
@@ -205,4 +205,4 @@ public class ComponentWithProps(
205
205
}
206
206
```
207
207
208
-
The generated DSL equivalent will be `factory { ComponentWithProps(getProperty("id", ComponentWithProps.DEFAAULT_ID)) }`
208
+
The generated DSL equivalent will be `factory { ComponentWithProps(getProperty("id", ComponentWithProps.DEFAULT_ID)) }`
0 commit comments