reduxkotlin-reselect

Redux reselect implementation for Redux-Kotlin. Mulitiplatform supported.

Лицензия

Лицензия

Категории

Категории

Kotlin Языки программирования
Группа

Группа

org.reduxkotlin
Идентификатор

Идентификатор

reselect
Последняя версия

Последняя версия

0.5.5
Дата

Дата

Тип

Тип

pom
Описание

Описание

reduxkotlin-reselect
Redux reselect implementation for Redux-Kotlin. Mulitiplatform supported.
Ссылка на сайт

Ссылка на сайт

https://github.com/reduxkotlin/Reselect/
Система контроля версий

Система контроля версий

https://github.com/reduxkotlin/Reselect/

Скачать reselect

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.reduxkotlin/reselect/ -->
<dependency>
    <groupId>org.reduxkotlin</groupId>
    <artifactId>reselect</artifactId>
    <version>0.5.5</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.reduxkotlin/reselect/
implementation 'org.reduxkotlin:reselect:0.5.5'
// https://jarcasting.com/artifacts/org.reduxkotlin/reselect/
implementation ("org.reduxkotlin:reselect:0.5.5")
'org.reduxkotlin:reselect:pom:0.5.5'
<dependency org="org.reduxkotlin" name="reselect" rev="0.5.5">
  <artifact name="reselect" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.reduxkotlin', module='reselect', version='0.5.5')
)
libraryDependencies += "org.reduxkotlin" % "reselect" % "0.5.5"
[org.reduxkotlin/reselect "0.5.5"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

Reselect

CI

badge badge badge badge badge badge badge badge

A Redux Reselect implementation for memoized dispatch on state selectors. Forked from Reduks implementation.

Documentation to come.

Example usage:

Subscribe to a single substate:

//selecting a substate subscribes to changes.  Lambda block will be executed when there is 
//a change in value of `isLoading`
val subscriber: StoreSubscriber = store.select({ it.isLoading }) {
        loadingIndicator.visibility = if (store.state.isLoading) View.VISIBLE else View.GONE
    }

//invoking subcription unsubscribes.  Do this when appropriate for component lifecycle
subscriber()  

Subscribe to multiple substates:

val multiSubscription = store.selectors {
            select({ it.isLoading }) {
                loadingIndicator.visibility = if (store.state.isLoading) View.VISIBLE else View.GONE
            }
            select({ it.name }) {
                nameTextView.text = store.state.name
            }
        }

//unsubscribe when appropriate
multiSubscription()

How to add to project:

Requires Kotlin 1.4.0. Artifacts are hosted on maven central. For multiplatform, add the following to your shared module:

kotlin {
  sourceSets {
        commonMain { //   <---  name may vary on your project
            dependencies {
                implementation "org.reduxkotlin:reselect:0.5.5"
            }
        }
 }

For JVM only:

  implementation "org.reduxkotlin:reselect-jvm:0.5.5"
org.reduxkotlin

Redux-Kotlin

Redux for Kotlin multiplatform

Версии библиотеки

Версия
0.5.5