-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedPR contribution is appreciatedPR contribution is appreciated
Description
Description
Running ToggleExample produces multiple runtime warnings about accessing Environment values outside of being installed on a View.
Runtime Warnings
Accessing Environment<Dictionary<TintPlacement, AnyShapeStyle>>'s value outside of being installed on a View. This will always read the default value and will not update.
Accessing Environment<Font>'s value outside of being installed on a View. This will always read the default value and will not update.
Accessing Environment<Dictionary<TintPlacement, AnyShapeStyle>>'s value outside of being installed on a View. This will always read the default value and will not update.
Accessing Environment<Font>'s value outside of being installed on a View. This will always read the default value and will not update.
Impact
These warnings indicate that environment values are being accessed incorrectly, which could lead to:
- Default values being used instead of actual environment values
- Environment changes not propagating correctly
- Potential bugs in toggle rendering
Steps to Reproduce
- Run the ToggleExample app
- Observe the runtime warnings in the console
Investigation Needed
- Identify where
Environment<Dictionary<TintPlacement, AnyShapeStyle>>andEnvironment<Font>are being accessed outside the view hierarchy - Ensure environment values are accessed within proper view context
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedPR contribution is appreciatedPR contribution is appreciated