Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace most GoogleMap() rememberUpdatedState() usages with single State object and encapsulate Subcomposition functionality #492

Open
bubenheimer opened this issue Jan 1, 2024 · 0 comments · May be fixed by #522
Labels
triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@bubenheimer
Copy link
Contributor

The GoogleMap() implementation uses a gazillion individual rememberUpdatedState() calls. This is unwieldy and likely contributed to #481.

Instead, a single State object encapsulating the individual state properties can be used and passed as a parameter. This pattern is in compliance with Google Compose API guidelines.

The subcomposition should be made a separate composable function to prevent accidental access to local variables and better encapsulate subcomposition functionality.

@bubenheimer bubenheimer added triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Jan 1, 2024
@bubenheimer bubenheimer changed the title Replace most rememberUpdatedState() usages with single Scope object and encapsulate access Replace most rememberUpdatedState() usages with single State object and encapsulate access Jan 1, 2024
@bubenheimer bubenheimer changed the title Replace most rememberUpdatedState() usages with single State object and encapsulate access Replace most rememberUpdatedState() usages with single State object and encapsulate Subcomposition functionality Jan 1, 2024
@bubenheimer bubenheimer changed the title Replace most rememberUpdatedState() usages with single State object and encapsulate Subcomposition functionality Replace most GoogleMap() rememberUpdatedState() usages with single State object and encapsulate Subcomposition functionality Jan 1, 2024
bubenheimer added a commit to bubenheimer/android-maps-compose that referenced this issue Jan 1, 2024
…ate object and encapsulate Subcomposition functionality

Fixes googlemaps#492
bubenheimer added a commit to bubenheimer/android-maps-compose that referenced this issue Jan 1, 2024
…ate object and encapsulate Subcomposition functionality

Fixes googlemaps#492
bubenheimer added a commit to bubenheimer/android-maps-compose that referenced this issue Jan 1, 2024
… single State object and encapsulate subcomposition functionality

Fixes googlemaps#492
bubenheimer added a commit to bubenheimer/android-maps-compose that referenced this issue Jan 3, 2024
… single State object and encapsulate subcomposition functionality

Fixes googlemaps#492
bubenheimer added a commit to bubenheimer/android-maps-compose that referenced this issue Jan 10, 2024
… single State object and encapsulate subcomposition functionality

Fixes googlemaps#492
bubenheimer added a commit to bubenheimer/android-maps-compose that referenced this issue Feb 2, 2024
… single State object and encapsulate subcomposition functionality

Fixes googlemaps#492
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
1 participant