Open pkobrien opened 9 years ago
Yes, I agree this should be default. Although usually for dates you should have some locale formatting - with IDOMImage a custom rendering could be providing by extending the protocol.
On Fri, Jun 26, 2015 at 9:24 AM, pkobrien notifications@github.com wrote:
For objects that are missing this protocol method, would it make sense for freactive to wrap them in a (str foo) call? That would save one from having to do that for cases like this one:
[:p "Date/Time " (str (goog.date.DateTime.))]
— Reply to this email directly or view it on GitHub https://github.com/aaronc/freactive/issues/50.
I agree that extending a protocol is a viable option, and that there might be a need for special formatting. However, at this point I keep running into this error when I just want to throw a value into an element and display it in the browser. Sometimes it works, sometimes it doesn't. So it would be nice to have a default str wrapper. Which doesn't stop me from extending a protocol in the future in cases where that makes sense to do so.
For objects that are missing this protocol method, would it make sense for freactive to wrap them in a (str foo) call? That would save one from having to do that for cases like this one: