-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Calculator example uses outdated nodegui API #4
Comments
I had the same issue, I think hooks are the way to use the events now, this might help. e.g
as shown in the starter kit here.... https://github.com/nodegui/react-nodegui-starter/blob/master/src/components/steptwo.tsx#L7 I may be able to do a PR to update the examples to use the new versions if i get time. |
I have the same issue with the
As a result, I cannot use router with the newest API (I don't want to start my application using the old one). Also, it looks like the documentation is not up to date too. |
Hi @matrunchyk I have fixed the example code. I had to add an extra The extra View is needed since React's reconciler tries to add a view before removing a child view. You can find the changes needed in this commit here: e8bff26 |
Cool! Thank you very much! For now the extra View will work great for me. |
@master-atul I tried yesterday and I am still seeing the old code: |
Cloning this repo, building, and running as-is works perfectly thanks to the project-lock.json. (I believe this might be why the issue was overlooked.) But running
npm install @nodegui/nodegui
within a new project and copying over the example source files shows missing or differing API elements.The example project is using @nodegui/nodegui v0.6.5
The latest version at this time is @nodegui/nodegui v0.12.1
QPushButtonEvents
has been renamed toQPushButtonSignals
; This object also seems to be treated differently than before, so the snippedQPushButtonSignals.clicked
will not work.BaseWidgetEvents
has been removed.I would advise amending the project.json file so as to limit support to that last compatible version of the package. (running
npm update
on this example will break it)The text was updated successfully, but these errors were encountered: