Initial docs for experimental Web Performance APIs#4792
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.
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.
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.
cipolleschi
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
| ### `rnStartupTiming` ⚠️ | |
| ### `rnStartupTiming` |
There is a warning block below, we can avoid the emoji here, imho.
There was a problem hiding this comment.
This is aligned with how MDN defines the docs. For non-standard methods, the warning is always shown next to the method name.
|
|
||
| | Name | Type | Description | | ||
| | ---------------------------------------- | -------------- | --------------------------------------------------------- | | ||
| | `startTime` | number \| void | When the application startup was started. | |
There was a problem hiding this comment.
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.
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.
"until system boot" or "since system boot"? Isn't the system boot the starting point (the 0)?
There was a problem hiding this comment.
"until system boot". Since system boot is just performance.now().
Initial docs for the new Web Performance APIs in Canary.