Fork me on GitHub
#beginners
<
2023-08-14
>
Nik07:08:48

Hi everyone, I'm creating a very basic notes app in clojurescript. Here's details about my db, view and events files https://pastebin.com/MFm7uwFt I'm facing a weird issue where if i call (event/remove-element 2) directly in REPL then in browser I can see the note with id 2 getting removed but if I do it using a button from view then it doesn't work. 1. I ran individual lines from remove-element in REPL and it works 2. The console log files from both button on-click function and remove-element function are printed so they are getting called Any ideas why it is not working when I'm trying using html button click listener?

CarnunMP21:08:54

Is the id what you expect when you click the button?

Nik22:08:56

Yes @U018D6NKRA4, I have initial data with simple id (1,2,3) and user generated ids (uuid) For either of them, if I use ‘remove-element’ in REPL it works and using button it doesn’t work

Nik05:08:56

Turned out be a silly miss. I was getting string from html property and it failed equality check with number.

👍 2