badoo / badoo/MVICore

Binding news into view models

Open
#154 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
1.3k
Forks
88
PR merge metrics
No merged PRs in 30d

Description

Hello, everyone!

I am trying to understand how to bind feature state and news into one ViewModel. Let's assume I have `data class MyViewModel(val users: List, val loadError: String?)` and I have loading error as `News` class with error message text and I have users list as part of feature `State`
I do not understand how to wire them together. Should I do some magic combining `feature` with its own `feature.news` somehow. Or does it mean I am doing something wrong and News aren't supposed to affect ViewModels.
In other words, what are the best practicies here?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the MVICore documentation and examples covering Feature, State, News, and ViewModel concepts. Determine whether the project already documents how feature state and one-off news should be exposed together, then clarify the recommended pattern and add guidance for the MyViewModel scenario. Done means a newcomer can understand whether News belongs in the ViewModel and how to handle the loading error.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.