Fork me on GitHub
#re-frame
<
2020-07-11
>
sveri19:07:52

Hi, I have a modal that contains an input like this:

[:input#new-spec-name-input
 {:value     (<sub [::subs/new-modal-name]) :placeholder "Name" :required true
  :on-change #(>evt [::ev/update-new-modal-name (ut/get-value-of-event %)])}]
where <sub and >evt are just two wrapper functions around re-frame/dispatch. Now, on every change, the state is updated and the input displays the text as it should. But my when I run my UI tests, some of them fail, as some key presses are not recognized or maybe swallowed while updating the state. Beforehand I used a local component state atom where this did not happen. Am I doing something wrong? Is there a better way to update the state?

sveri19:07:59

Thank you very much 🙂