cferdinandi / reef

A lightweight library for creating reactive, state-based components and UI.
https://reefjs.com
MIT License
1.16k stars 77 forks source link

Objects with functions lost when copied to props #155

Closed anthonysan95 closed 2 years ago

anthonysan95 commented 2 years ago

Test case: https://codepen.io/anthonysan95/pen/KKowWjE (updated to reef v11)

Hi @cferdinandi, If I try to set any object with functions in it's prototype, they get lost when i get try to use them in the template. I noticed that's because of the way the copy has been handled, if I try to use an object shouldn't the copy have the same functions of the original object?

Thanks, Anthony

cferdinandi commented 2 years ago

I don't have a good fix for this, but it's a moot point, as I just released Reef v12, which does away with data tied uniquely to a template.