Skip to content

Commit

Permalink
Adding notes regarding the issue when Android timers are not in sync …
Browse files Browse the repository at this point in the history
…with the debugger (facebook#2149)

* feat: adding notes regarding android timer sync

* refator: changes wording on timers

* update: adb shell command

* move the note at the bottom of Timers section

Co-authored-by: Jason Safaiyeh <[email protected]>

Co-authored-by: Bartosz Kaszubowski <[email protected]>
  • Loading branch information
gedeagas and Simek authored Aug 19, 2020
1 parent d6523cf commit d16de61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ To debug the JavaScript code in Chrome, select "Debug JS Remotely" from the Deve

Select `Tools → Developer Tools` from the Chrome Menu to open the [Developer Tools](https://developer.chrome.com/devtools). You may also access the DevTools using keyboard shortcuts (`⌘⌥I` on macOS, `Ctrl` `Shift` `I` on Windows). You may also want to enable [Pause On Caught Exceptions](http://stackoverflow.com/questions/2233339/javascript-is-there-a-way-to-get-chrome-to-break-on-all-errors/17324511#17324511) for a better debugging experience.

> Note: on Android, if the times between the debugger and device have drifted; things such as animation, event behavior, etc., might not work properly or the results may not be accurate. Please correct this by running `` adb shell "date `date +%m%d%H%M%Y.%S%3N`" `` on your debugger machine. Root access is required for the use in real device.
> Note: the React Developer Tools Chrome extension does not work with React Native, but you can use its standalone version instead. Read [this section](debugging.md#react-developer-tools) to learn how.
### Debugging using a custom JavaScript debugger
Expand Down
2 changes: 2 additions & 0 deletions docs/timers.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Timers are an important part of an application and React Native implements the [

The `Promise` implementation uses `setImmediate` as its asynchronicity implementation.

> Note: when debugging on Android, if the times between the debugger and device have drifted; things such as animation, event behavior, etc., might not work properly or the results may not be accurate. Please correct this by running `` adb shell "date `date +%m%d%H%M%Y.%S%3N`" `` on your debugger machine. Root access is required for the use in real device.
## InteractionManager

One reason why well-built native apps feel so smooth is by avoiding expensive operations during interactions and animations. In React Native, we currently have a limitation that there is only a single JS execution thread, but you can use `InteractionManager` to make sure long-running work is scheduled to start after any interactions/animations have completed.
Expand Down

0 comments on commit d16de61

Please sign in to comment.