Skip to content

How to set @State based on Flux state #11

@ghost

Description

For example, in order to display a list of movie timeline via a Segmented Tab View, I can a list of timeline via store.state.moviesState.movies, and also I can get the nearest future one as active/selected tab item.

My question then is how I can set this value to my @State. Seem Flux like state is not designed for @State and @binding

@State var activeSegmentedControlTabIndex: Int = 0

MySegmentedControl(tabData: timelineData, activeSegmentedControlTabIndex: $activeSegmentedControlTabIndex)

image

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