Small update on the website playground#2616
Merged
alexdima merged 3 commits intomicrosoft:mainfrom Aug 23, 2021
Merged
Conversation
hediet
reviewed
Aug 17, 2021
|
|
||
| // When cleaning up remember to call myBinding.dispose() | ||
| // You can't dispose `addCommand` | ||
| // If you need to dispose it you might use `addAction` or `registerCommand` |
Member
There was a problem hiding this comment.
I don't know all about addCommand / addAction, but why would you need to dispose?
Contributor
Author
There was a problem hiding this comment.
I'm using monaco-editor in a NextJS app.
I need it to be updated every time an specific hook updates. If I don't dispose it the app gets slow pretty quick.
Now I'm just using addAction because it can be dispose.
It seams like it used to return a dispose then it change and someone forgot to update the playground.
Contributor
Author
There was a problem hiding this comment.
Here I opened an issue on monaco-react . At the beginning I thought I could use addCommand because in the playground you can see the lines:
// When cleaning up remember to call myBinding.dispose()But, that is not true anymore. That's why I changed.
Member
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi.
I added 3 small fixes. Two of them are spelling corrections and the other one is an outdated comment
We can't
disposeaddCommandanymore... It can create confusion .