Open dpservis opened 2 years ago
There is active work on TKO which is backwards compatible with knockout but it's not readily consumable right now (ie you have to figure it out). That said tko has been used with millions of page views across thousands of users, so it's pretty solid.
The lead maintainer's commit activity may give you some insight.
There is active work on TKO which is backwards compatible with knockout but it's not readily consumable right now (ie you have to figure it out). That said tko has been used with millions of page views across thousands of users, so it's pretty solid.
Hi Brian,
thanks for your response. What do you mean it's not readily consumable right now? Can I use it as a drop-in replacement and deliver a quality product to my users? Or is it in some α/β/ state that is not yet to be released with industrial strength software? What do I need to figure out myself? Apologies if I am a bit direct, I just want to know our technical options to take decisions and by no means do I try to underestimate your work.
Hi @dpservis There's a bit of DIY with figuring out how to consume the library. But other than that setup that folks have had good luck with it as a straight-up replacement for Knockout. The one area that's been an issue is that TKO compiles inline functions without needing unsafe-eval
in your Content Security Policy, but the lambda parser is not a full javascript parser so for some inline functions it misses the mark (e.g. { x: function () { return 123 } }
type arguments, when more complex than that, may not work).
@danieldickison I'd be curious if you had any thoughts on your experience moving from knockout to TKO that might help @dpservis .
@dpservis As Brian mentioned, we recently migrated our entire site from knockout 3.5.1 to tko. We ended up fixing some compatibility issues in tko itself that haven't been released yet so you'll want to build from source against the current main branch. After running make
, the builds/knockout/dist/browser.min.js
file will be mostly a drop-in replacement for knockout.
It's not 100% a drop-in replacement, though. I'm hoping to write this up properly in the near future but here are my notes from our internal wiki:
foreach
binding no longer creates a child binding context when using the foreach: {data: myArray, as: 'foo'}
form. That means anywhere we used that form and referenced $parent or $parents inside of the loop would end up broken. I refactored these to avoid the use of as
so that the code worked under both ko and tko during our transition period.
Hello
in my current job we used knockout in a project that was cancelled a couple of years ago but now we would like to resurrect it. Looking at the repository and the releases it seems that the project is in a stale state. So I wanted to ask, is there any activity actually going on, are there any planned future releases, bug fixes, security fixes in the pipeline?
Thanks a lot
Dimitris