Skip to content

Instantly share code, notes, and snippets.

@psteiger
Last active November 20, 2020 16:41
Show Gist options
  • Save psteiger/0cdecebd424bca81e332100c83f80c64 to your computer and use it in GitHub Desktop.
Save psteiger/0cdecebd424bca81e332100c83f80c64 to your computer and use it in GitHub Desktop.
@AndroidEntryPoint
class NearbyUsersActivity : AppCompatActivity() {
private val viewModel: NearbyUsersViewModel by viewModels()
override fun onCreate(savedInstanceState: Bundle?) {
viewModel.locations.observe(this) { state: State ->
// Update views with the data.
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment