Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/pavi2410/usecompose
- Owner: pavi2410
- License: mit
- Created: 2021-12-14T12:38:13.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-05T02:16:30.000Z (8 months ago)
- Last Synced: 2024-05-02T02:53:06.293Z (6 months ago)
- Topics: android, android-library, composable, compose, headless, hooks, jetpack-compose, kotlin, library, react, react-hooks, ui
- Language: Kotlin
- Homepage:
- Size: 162 KB
- Stars: 28
- Watchers: 3
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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/)