MobileNativeFoundation / MobileNativeFoundation/Store

[Feature Request] Store without a Fetcher

Open
#536 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Kotlin
Stars
3.4k
Forks
217
Avg merge
18m
Merged PRs (30d)
4

Description

Is your feature request related to a problem? Please describe.
I would like to be able to create a (Mutable)Store for local-only data.
The goal is to replace the Repositories with Stores; the issue comes when I can't write directly to a Store that is not Mutable, but to create a MutableStore I need an Updater and a Bookeeper

Describe the solution you'd like

val localStore: MutableStore = 
  StoreBuilder
    .from(sourceOfTruth) // no fetcher
    .build() // it returns a MutableStore, because no Fetcher is declared

Describe alternatives you've considered

  • Keep repositories for local only data -> different approaches in the code-base
  • Pass local data source directly to the use case -> no 🙅🏻‍♂️
  • Create a LocalStore in the project, which would be a clone of Store, but with local data only -> it would be confusing, it would still behave differently from the original Store, without in-memory cache and it would need to be maintained "manually"

Additional context
none

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the StoreBuilder, Store, MutableStore, Updater, and Bookeeper entry points mentioned in the issue, and trace how a fetcher is currently required. Done means a Store can be built from a sourceOfTruth without a fetcher and exposes the requested mutable local-only behavior without requiring an Updater or Bookeeper.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.