JavaScript JavaScript and the DOM Traversing the DOM Getting the First and Last Child

Victor Evangelista
Victor Evangelista
16,745 Points

My Solution for JavaScript List (Need a little assistance with button flicker issue)

Here is my solution: https://w.trhou.se/m63kdejjz3

I am working with most of the original code. I've added two new functions:

const buttonDisabler

const buttonReset

Whenever the user adds a new list item, the button will flicker for a quick moment before its replaced by a button without the disabled styling.

1 Answer

Steven Parker
Steven Parker
163,760 Points

To avoid "flashing", make sure that the buttons are all in the desired state before the new list item is added to the DOM. Otherwise, there will always be a moment between when the list item is added and the states are reset where the default appearance might be seen.