Skip to content

Component interface best practice #149

Answered by arkivanov
Burtan asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for asking this question! Transferred to Discussions.

It's just a matter of preference, you can avoid interfaces if you don't like them. But there could be more than one implementation for each component.

The TodoApp example features up to three different implementations for a component:

  1. Production implementation - TodoMainComponent
  2. Fake implementation for integration tests - TodoMainFake
  3. Fake implementation for Compose previews - TodoMainPreview

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@arkivanov
Comment options

@Burtan
Comment options

Answer selected by Burtan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #148 on July 20, 2022 10:46.