#Button Duplicating when using <Show>

4 messages · Page 1 of 1 (latest)

frozen bison
#

Hi Everyone, new to Solid, so this may be just something that I'm overlooking. I've attached a screenshot of my code snippet.
For some reason, when this component renders, it's duplicating the buttons. Any idea why this is happening/how to avoid it while still retaining the functionality I want (opening a modal on button click, which is changing a the showModal() signal to true). Thanks!

onyx sparrow
#

this code looks fine
maybe besides setting signals in an effect
but that is probably unrealated
what exactly do you mean by "duplicating"?
do you have two buttons on the screen at the same time when calling the component only once? or is it the fact that the button is recreated with each state change?

frozen bison
#

I...just solved my problem. We had a duplicate component in the App component

#

Just one of those mornings. Thank you so much for your speedy response!