Why i could only remove the jokes from favorite list after refresh?

I had an issue with my codes, which has to do with splice method. This method only works after refresh and so I was wondering how does that come.

Handlers are not binded yet to data that has recently been stored in localStorage.