Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pavi2410/usecompose

Headless @Composable hooks that drive UI logic. Inspired by React.
https://github.com/pavi2410/usecompose

android android-library composable compose headless hooks jetpack-compose kotlin library react react-hooks ui

Last synced: 26 days ago
JSON representation

Headless @Composable hooks that drive UI logic. Inspired by React.

Awesome Lists containing this project

README

        

# useCompose

Headless @Composable hooks that drive UI logic. Inspired by React.

[![](https://jitpack.io/v/pavi2410/useCompose.svg)](https://jitpack.io/#pavi2410/useCompose) [![CI](https://github.com/pavi2410/useCompose/actions/workflows/ci.yml/badge.svg)](https://github.com/pavi2410/useCompose/actions/workflows/ci.yml)

| ⚛ `react` | ❓ `query` |
| --- | --- |
| ![react example](https://github.com/pavi2410/useCompose/assets/28837746/0a271bda-fc47-47b3-8cb6-daf6748a2633) | ![query example](https://github.com/pavi2410/useCompose/assets/28837746/2317d447-8f8b-4626-b92e-2e024e242714) |

## Modules

### ⚛ react
- useState
- useEffect
- useContext
- useReducer

### 🪝 hooks
- useToggle

### 🕸 network
- useConnnectionStatus

### ❓ query
- useQuery

## Installation

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:
```gradle
repositories {
...
maven {
url = uri("https://jitpack.io")
}
}
```

Step 2. Add the dependency
```gradle
dependencies {
implementation("com.github.pavi2410.useCompose::")
}
```

## Help Wanted

I want your help in making this library extensive such that this cover many of the commonly used hooks. Also, I want your help in building a KMP friendly library.

## License

[MIT](https://choosealicense.com/licenses/mit/)