Fork me on GitHub
#re-frame
<
2023-01-05
>
James Pratt08:01:41

Hi there. I'm going through wonderful re-frame documentation currently looking at the explanation of the reframe /simple example with the coloured clock. I'm quite surprised that the dom doesn't apparently try to update until the user enters some valid colour in the input box. The browser doesn't update the dom unless the syntax is valid? https://day8.github.io/re-frame/dominoes-live/

Jacob Emcken09:01:02

I doubt this is behaviour specific to re-frame or Reagent. It seems to come all the way from React itself: https://stackoverflow.com/questions/63318740/react-passing-invalid-css-color-through-prop-does-not-affect-previously-stated

James Pratt10:01:34

Seems it is the browser itself that only updates the property when it receives a valid value to update to. https://stackoverflow.com/questions/48484767/javascript-check-if-string-is-valid-css-color?noredirect=1&amp;lq=1

👍 2