-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Initial docs for experimental Web Performance APIs #4792
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
Conversation
✅ Deploy Preview for react-native ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
11f641b
to
ce0272e
Compare
ce0272e
to
5becff7
Compare
@@ -0,0 +1,10 @@ | |||
--- | |||
id: global-EventCounts | |||
title: EventCounts 🧪 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the addition on PR preview, everything looks good! 👍
Just wonder if we should place the emoji before the sidebar/page title to match arrangement of already existing pages like "InteractionManager" or "DEV"?
I also looked if we can do something about not the greatest sidebar wrapping for few entries:

It's nothing blocking, but did not found any easy solution for that changing few styles in the DevTools, so it's just a note for me, for later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wonder if we should place the emoji before the sidebar/page title to match arrangement of already existing pages like "InteractionManager" or "DEV"?
I followed the same convention we have on react.dev, and it's also used by MDN. I can change the other cases to align with this instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly good for me! I left a couple of comments to improve consistency and a double check on other details.
:::tip Canary 🧪 | ||
|
||
**This API is currently only available in React Native’s Canary and Experimental channels.** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the experimental message has more details than the canary one. I'd suggest that we either provide details for both or none.
|
||
--- | ||
|
||
# Reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is the only class with Reference and a more detailed documentation than just a link to the Web specification one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it has additional methods that are RN-specific.
|
||
See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/memory). | ||
|
||
### `rnStartupTiming` ⚠️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### `rnStartupTiming` ⚠️ | |
### `rnStartupTiming` |
There is a warning block below, we can avoid the emoji here, imho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is aligned with how MDN defines the docs. For non-standard methods, the warning is always shown next to the method name.
docs/global-performance.md
Outdated
|
||
| Name | Type | Description | | ||
| ---------------------------------------- | -------------- | --------------------------------------------------------- | | ||
| `startTime` | number \| void | When the application startup was started. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might need a bit of more information. In a greenfield react native app, does it takes into account the native startup time?
What does it mean for a brownfield application, where React Native might be initialized only when the user navigate to a specific tab or screen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I checked and in OSS this is always the time of RN runtime initialization. I fixed that.
### `timeOrigin` | ||
|
||
:::warning Partial support | ||
Provides the number of milliseconds from the UNIX epoch until system boot, instead of the number of milliseconds from the UNIX epoch until app startup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"until system boot" or "since system boot"? Isn't the system boot the starting point (the 0)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"until system boot". Since system boot is just performance.now()
.
Initial docs for the new Web Performance APIs in Canary.