SwiftUI MenuBarExtra not updating when State changes

hi is there any way to UPDATE dropdown content Text or do anything when "@State" changes ? cuz in normal SwiftUI views everything rerenders when "@State" changes expect this new "MenuBarExtra"

code in "label:" part will update when "@State" change but where I added "ControlView()" it does not :/

example code:


@State var secounds = 0

     @State var timerRunning = false

    let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect()


    var body: some Scene {

        MenuBarExtra {

            ControlView()

        } label: {

            Text("\(hours):\(minutes):\(secounds)")

                .onReceive(timer) { _ in

                    }

                }

        }

        .menuBarExtraStyle(.window)

    }

    

    @ViewBuilder
    func ControlView()->some View {

        Grid(horizontalSpacing: 12, verticalSpacing: 12) {

            GridRow {

                ZStack {

                    RoundedRectangle(cornerRadius: 12, style: .continuous)

                        .fill(.red)

                        .frame(height: 75)

                    

                    Text("\(timerRunning ? "Pause" : "Play")")

                        .padding()

                        .onTapGesture {

                            timerRunning.toggle()

                        }

                }

            }

        }

        .padding(10)

    }

I've reported this bug and found a work around with an Apple dev. Don't use @State and instead use @EnvironmentObject.

I am seeing the same thing on Sonoma and the lastest version of Xcode. I have updated to using @EnvironmentObject and I do not see any updated in my UI.

Same.

SwiftUI MenuBarExtra not updating when State changes
 
 
Q