-
-
Notifications
You must be signed in to change notification settings - Fork 619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Box
height
doesn't reset on re-render
#228
Comments
Could you try out #232 and let me know if it fixes the issue for you? |
Put this example in $ git checkout https://github.com/colinking/ink-testing.git
$ npm i
$ npx ts-node src/height.tsx Just tried running it with the latest version from your branch, and it appears that the CLI exits without waiting. For example: // "ink": "^2.3.0",
$ npx ts-node src/height.tsx
1
2
3
$ // "ink": "vadimdemedes/ink#experimental-reconciler",
$ npx ts-node src/height.tsx
Loading...
$ |
Yeah, I had the exact same problem few days ago. Replacing |
I'm not sure why original reconciler/renderer doesn't have the same problem, I wonder if it's the slowness of building new output every frame. New reconciler is significantly faster in that regard, so it could be that. |
I can't believe I just spent an entire day debugging React internals and all it was is just out-dated |
Fixed via e5b7569 for non-experimental mode. Will keep this issue open until release. |
Fixed in |
It appears that the
height
property might be updated when re-rendering a component, though I may be misunderstanding something!Here's a quick example:
I would expect to see all five numbers printed out, but only see the first three:
When run with
debug=true
:Note: I just swapped
height
out withmarginTop
/marginBottom
here and it works fine!The text was updated successfully, but these errors were encountered: