Multiple ink apps
See original GitHub issueHi,
I am trying to run one ink app, wait until it exits and then start another ink app. This doesn’t seem to work. Here is an example code:
import {Color, AppContext, render} from 'ink';
import React, {Component} from 'react'
class Elem extends Component{
constructor(){
super()
setTimeout(() => {
this.props.exit()
}, 2000);
}
render(){
return (<Color bold>{this.props.text}</Color>)
}
}
const ElemApp = ({text})=>(
<AppContext.Consumer>
{({ exit }) => (
<Elem text={text} exit={exit}/>
)}
</AppContext.Consumer>
)
async function start(){
const app = render(<ElemApp text="App 1" />);
await app.waitUntilExit()
const app2 = render(<ElemApp text="App 2" />);
await app2.waitUntilExit()
console.log("finished")
}
start()
App 1 renders fine but App 2 never renders and directly jumps to finished
line.
Am I doing it wrong?
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Inks and Pens on the App Store
Inks and Pens is a natural media drawing app especially designed for iPad and the Apple Pencil. It reproduces the feelings of drawing...
Read more >7 pen-friendly apps for Windows Ink - CNET
7 pen-friendly apps for Windows Ink · Maps · OneNote · FluidMath · Autodesk Sketchbook · Graphiter · Bamboo Paper · DocuSign ·...
Read more >10 Great Pen-Enabled Apps That Work with Windows Ink
10 Great Pen-Enabled Apps That Work with Windows Ink · Fused · Plumbago · Sketchable · FluidMath · Drawboard PDF · StaffPad ·...
Read more >Color Pick Pen - Scribble - Capture and Draw with 16 Million ...
The Scribble Ink Pen comes with three different sizes of drawing tip, ... The Scribble APPs let you capture, create and save as...
Read more >12 Best Pen Friendly Apps for Windows Ink - Wpxbox
Best Pen Friendly Apps for Windows Ink · 1. Drawboard PDF · 2. Colour by Disney · 3. Sensavis Visual Learning Tool ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for a detailed bug report, guys! Issue should be fixed via https://github.com/vadimdemedes/ink/commit/6889f47e5c67210e780c357f0fbb51297a25f5e2.
@Jarred-Sumner @asadm would you be able to pull Ink’s master (
npm install vadimdemedes/ink
) and verify that it solved your problem? I will do a new release afterwards.I’ll take a look and reply back here, thanks!