3 ms·
What role did Ink serve? I mean couldn’t you have just logged to console? I’m trying to figure out if Ink enabled you to do something at all, made it easier, o
by nonethewiser 4y ago
What role did Ink serve? I mean couldn’t you have just logged to console?
I’m trying to figure out if Ink enabled you to do something at all, made it easier, or you just liked using it. All of which are fair. It seems like you just liked using it.
- alexeldeib 4y agoI think it’s rerendering the “UI” on data updates. Basically exactly the readme for ink. It’s a single log line of output, but it’s repainted in place, not appended to stdout. Sure you can do that other ways. Personally I’d love to build terminal tuis with react component!
- gkfasdfasdf 4y agoThanks I have never used react and this comment was very helpful, even after reading the project readme.
- nonethewiser 4y agothank you for clarifying. that makes sense and does sound nice to re-render the same line instead of logging a new line each time. I do think it would be simpler/faster (albeit maybe not nicer) to log a message w/ timestamp to accomplish the same thing, putting this in the "nice to have" category.
- twobitshifter 4y agoIf it’s just a single line using carriage return must be easier, right? I could see it being useful for something like a more complex tui dashboard.
- aloer 4y agowhat the other comment said, it replaces output and looks like a proper terminal UI. But it also adds features for hotkeys, progress bars, text input etc. I have it integrated into a bigger CLI project where only a few commands enter the UI. Most of them just render to stdout and are meant to be pipeable