Skip to content

Mutable state tied directly to an URL parameter #266

@jakobkmar

Description

@jakobkmar

Is there a simple way to tie some kind of mutable state directly to an URL parameter in a simple way?

val myParameter by remember { urlParameterState("myKey") }

// changing the state also manipulates the parameter in the url
myParameter = listOf("new value")

I think this is a pretty common usage of url parameters in compose for web.
Does something like that already exist in the library? And if not, what would be the best way to achieve this abstraction?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions