Welcome to ⚓️ anchor
Anchor is simple and extensible state management architecture built on Kotlin's Context receivers with Jetpack Compose integration.
Goal
Focus on writing an amazing app and let Anchor handle the rest!
Installation
Follow the Github Packages guide to use a published package from the github packages repository.
-
Generate a classic token with
read:packages
access with the help of Github guide -
Add the repository to your build.gradle.kts file
-
Add the package dependencies to your build.gradle.kts file
Counter example
Counter example to showcase the usage of Anchor architecture. The screen displays a count and the ability to increment and decrement the count.
ViewModel
Storing Anchor within a ViewModel is not required manually. RememberAnchor
takes care of handling the storage within a dedicated ViewModel.
Configuration changes and process death
TBD
ViewState
TBD
License
Copyright 2025 Karoly Somodi
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.