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

Dynamically added text #47

Open
frantischek opened this issue Feb 27, 2024 · 0 comments
Open

Dynamically added text #47

frantischek opened this issue Feb 27, 2024 · 0 comments

Comments

@frantischek
Copy link

frantischek commented Feb 27, 2024

I try to add an emoji which is recieved by an APN:

    @State private var receivedEmoji: String = "🎉"
    @State private var cannonEmoji: String = "🥥"
[...]
        VStack {
[...]
        .onChange(of: receivedEmoji) { newValue in
            animationCounter += 1
            cannonEmoji = newValue
            print("Emoji \(cannonEmoji)") <--- here it prints the recieved emoji and not the initialized one.
        }
       // .animation(.easeInOut(duration: 0.5), value: sortedActions)
        ConfettiCannon(counter: $animationCounter ,confettis: [.text(cannonEmoji)], confettiSize: 20)

.text(cannonEmoji)allways fires the coconut (🥥) - which looks also great. :D

How can I solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant