Skip to content

Commit 2c983fe

Browse files
committed
Add more documentation
1 parent dc05ba0 commit 2c983fe

File tree

1 file changed

+4
-1
lines changed
  • packages/app/src/app/overmind/namespaces/editor

1 file changed

+4
-1
lines changed

packages/app/src/app/overmind/namespaces/editor/actions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,10 @@ export const onOperationApplied: Action<{
374374
* we'll just update it in the state and send a live message based on the diff.
375375
*
376376
* The difference between `setCode` and `codeChanged` is small but important to keep in mind. Calling this method will *always*
377-
* cause `codeChanged` to be called. But from different sources based on whether the file is currently open. The two cases:
377+
* cause `codeChanged` to be called. But from different sources based on whether the file is currently open. I'd recommend to always
378+
* call this function if you're aiming to manually set code (like updating package.json), while editors shouild call codeChanged.
379+
*
380+
* The two cases:
378381
*
379382
* ### Already opened in VSCode
380383
* 1. set code in VSCode

0 commit comments

Comments
 (0)