You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Profile React Native App in Release mode with React DevTools for React.Profiler
9
+
The React on Web allows the users to run [profilable](https://react.dev/reference/dev-tools/react-performance-tracks#using-profiling-builds) builds to get near to production experience. This is the sweetest spot to having more confident profiling. However, on React Native this wasn't possible until now.
10
+
11
+
This package fixes this gap following the same analogy from React on Web, by allowing React Native to load Profiling shim for Release builds. 🚀
12
+
13
+
## Demo
14
+
15
+

16
+
17
+
<hr/>
18
+
19
+
## Applications
20
+
21
+
**Why you need this?**
22
+
23
+
#### Profiling React Components in Release builds
24
+
25
+
Most teams leverage React DevTools to profile their components in Debug Builds. If you are looking to profile React Components in Release builds, then this package is for you.
26
+
27
+

28
+
29
+
#### Inspecting React.Profiler callbacks in Release builds
30
+
31
+
Teams can have a use case where they leverage `React.Profiler` and perform their calculations from the values of the `onRender` callback. In debug builds, this works very well. If you are also interested in running these calculations in release builds, then this package is for you.
32
+
33
+
```ts
34
+
function onRender(id, phase, actualDuration, baseDuration, startTime, commitTime) {
Now build and run your app in release mode, you should see the react devtools connected to your Application. 🚀
86
+
87
+
<hr/>
88
+
89
+
## Configurations
90
+
91
+
### API
92
+
93
+
The `@callstack/react-native-release-inspector` requires the user to configure their `metro.config` as shown above. This `withReactNativeReleaseInspector` receives the following arguments:
-[Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)
30
126
-[Code of conduct](CODE_OF_CONDUCT.md)
31
127
32
-
## License
128
+
## Made with ❤️ at Callstack
33
129
34
-
MIT
130
+
**react-native-release-inspector** is an open source project and will always remain free to use. If you think it's cool, please star it 🌟.
131
+
132
+
[Callstack](https://www.callstack.com/) is a group of React and React Native geeks, contact us at [hello@callstack.com](mailto:hello@callstack.com) if you need any help with these or just want to say hi!
35
133
36
134
---
37
135
38
136
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
Copy file name to clipboardExpand all lines: apps/example/ios/ReleaseInspectorExample.xcodeproj/xcshareddata/xcschemes/ReleaseInspectorExample.xcscheme
0 commit comments