Open in app

Sign in

Write

Sign in

The important point here is that when you annotate a function type with @Composable you’re changing its type: the same function type without the annotation is not compatible with the annotated type. Also, suspend functions require a calling context, meaning that you can only call suspend functions inside of another suspend function.

Under the hood of Jetpack Compose — part 2 of 2
3K
9

Leland Richardson

Abhimanyu
Abhimanyu
May 11, 2021

--

If "@Composable" and "suspend" works in a similar way, why is it an annotation an not a keyword "composable"?

--

--

Abhimanyu
Abhimanyu

Written by Abhimanyu

114 followers
·265 following

Android Engineer @ GRAB | Linked In - https://www.linkedin.com/in/abhimanyu-n

Responses (1)

Help

Status

About

Careers

Press

Blog

Privacy

Rules

Terms

Text to speech