val state = remember(user) { UserDetailsState(user) }
UserDetailsView(state = state)

This code snippet sets up and manages the state of user details and renders the UI based on that state.

For a more detailed API definition, check out the API docs here.