Skip to content

Commit b7ecac8

Browse files
authored
Merge pull request #73 from LovesWorking/remove-safe-area-provider-error
add new dev tool render highlights
2 parents 4212eb9 + 36313e9 commit b7ecac8

File tree

114 files changed

+31716
-716
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+31716
-716
lines changed

HIGHLIGHT_UPDATES_CONTROL.md

Lines changed: 746 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 81 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ All installed tools automatically appear in your floating menu. No config needed
5353
> 💡 **Pro Tip**: Install all tools at once:
5454
>
5555
> ```bash
56-
> npm i @react-buoy/{core,env,network,storage,react-query,route-events,debug-borders}
56+
> npm i @react-buoy/{core,env,network,storage,react-query,route-events,debug-borders,highlight-updates}
5757
> ```
5858
5959
---
@@ -80,14 +80,15 @@ All installed tools automatically appear in your floating menu. No config needed
8080
8181
Install any combination to customize your dev menu:
8282
83-
| Tool | Package | What It Does | Key Features |
84-
| ------------------ | --------------------------- | ------------------------------ | --------------------------------------------- |
85-
| 🌍 **ENV** | `@react-buoy/env` | Environment variable inspector | Validation, search, type checking, warnings |
86-
| 📡 **Network** | `@react-buoy/network` | API request monitor | Timeline view, filtering, performance metrics |
87-
| 💾 **Storage** | `@react-buoy/storage` | AsyncStorage/MMKV browser | View/edit/delete, bulk ops, validation |
88-
|**React Query** | `@react-buoy/react-query` | TanStack Query devtools | Cache inspector, offline toggle, refetch |
89-
| 🧭 **Routes** | `@react-buoy/route-events` | Route & navigation tracker | Sitemap, stack view, event timeline |
90-
| 🎨 **Borders** | `@react-buoy/debug-borders` | Visual layout debugger | Colored component boundaries |
83+
| Tool | Package | What It Does | Key Features |
84+
| ------------------ | ------------------------------- | ------------------------------ | -------------------------------------------------- |
85+
| 🌍 **ENV** | `@react-buoy/env` | Environment variable inspector | Validation, search, type checking, warnings |
86+
| 📡 **Network** | `@react-buoy/network` | API request monitor | Timeline view, filtering, performance metrics |
87+
| 💾 **Storage** | `@react-buoy/storage` | AsyncStorage/MMKV browser | View/edit/delete, bulk ops, validation |
88+
|**React Query** | `@react-buoy/react-query` | TanStack Query devtools | Cache inspector, offline toggle, refetch |
89+
| 🧭 **Routes** | `@react-buoy/route-events` | Route & navigation tracker | Sitemap, stack view, event timeline |
90+
| 🎨 **Borders** | `@react-buoy/debug-borders` | Visual layout debugger | Colored component boundaries |
91+
| 🔄 **Highlights** | `@react-buoy/highlight-updates` | Render highlight tracker | Visual re-render detection, render counts, history |
9192
9293
**Installation Pattern**: All packages follow the same simple pattern:
9394
@@ -155,6 +156,17 @@ npm install @react-buoy/{tool-name}
155156

156157
</details>
157158

159+
### Highlight Updates
160+
161+
<details>
162+
<summary>Show preview</summary>
163+
164+
<!-- TODO: Add screenshot -->
165+
166+
_Screenshot coming soon_
167+
168+
</details>
169+
158170
</details>
159171

160172
---
@@ -606,6 +618,37 @@ function App() {
606618

607619
</details>
608620

621+
<details>
622+
<summary><strong>🔄 Highlight Updates (@react-buoy/highlight-updates)</strong></summary>
623+
624+
### What It Does
625+
626+
Visual component re-render tracker that highlights components when they render. Helps identify unnecessary re-renders and performance bottlenecks.
627+
628+
### Install
629+
630+
```bash
631+
npm install @react-buoy/highlight-updates
632+
```
633+
634+
### Features
635+
636+
- 🔄 **Visual Render Detection** - See components flash when they re-render
637+
- 🔢 **Render Counts** - See exact render counts on each component to identify problematic re-renders
638+
- 📊 **Render History** - Track which components render and how often
639+
- 🎛️ **Filter Controls** - Filter by component type or render frequency
640+
- 🎭 **Toggle Mode** - Quick tap to enable/disable highlights
641+
- 📋 **Modal View** - Detailed render list with timing information
642+
- ⚡ Zero performance impact when disabled
643+
644+
### Usage
645+
646+
**Zero Config (Recommended)**: Just install and it auto-appears as an "UPDATES" button in the floating menu.
647+
648+
````
649+
650+
</details>
651+
609652
---
610653
611654
## 🏗️ Advanced Configuration
@@ -638,7 +681,7 @@ const customTools = [
638681
apps={customTools} // Overrides auto-discovery for these IDs
639682
environment="production"
640683
/>
641-
```
684+
````
642685

643686
### Complete Manual Setup (No Auto-Discovery)
644687

@@ -738,15 +781,41 @@ React Buoy remembers:
738781
- Which tools are open
739782
- Tool positions (if dragged)
740783
- Minimized vs expanded state
784+
- Modal sizes and positions
741785
- User preferences
742786

743-
**Storage Key**: `@apphost_open_apps`
787+
### Storage Backends
788+
789+
React Buoy uses a **smart storage system** that automatically picks the best available option:
790+
791+
| Backend | Persists Through Logout? | Requires | When Used |
792+
|---------|-------------------------|----------|-----------|
793+
| 📁 **File System** | ✅ Yes | `expo-file-system` | Dev builds, RN CLI |
794+
| 💾 **AsyncStorage** | ❌ No (cleared on logout) | `@react-native-async-storage/async-storage` | Expo Go fallback |
795+
| 🧠 **Memory** | ❌ No (lost on restart) | Nothing | Last resort |
796+
797+
**Why does this matter?**
798+
799+
If your app clears `AsyncStorage` during logout (common pattern), your devtools settings would normally be wiped too. With `expo-file-system` installed, settings persist independently—surviving logout flows, `AsyncStorage.clear()` calls, and more.
800+
801+
**To enable persistent storage:**
802+
803+
```bash
804+
# Expo projects
805+
npx expo install expo-file-system
806+
807+
# RN CLI projects
808+
npm install expo expo-file-system
809+
```
810+
811+
You can check which storage backend is active in **Settings → Storage Type** in the devtools menu.
744812

745813
This means your debugging session survives:
746814

747815
- ✅ Hot reloads
748816
- ✅ App restarts
749817
- ✅ Crash recovery
818+
- ✅ Logout flows (with file system storage)
750819

751820
### Minimize Feature
752821

@@ -758,6 +827,7 @@ Keep tools running in the background without cluttering your screen:
758827
4. **Dismiss** - Swipe down on the minimized indicator to close the tool completely
759828

760829
**Why minimize?**
830+
761831
- 👁️ Reduces visual clutter while debugging
762832
- ⚡ Keeps tools running (e.g., network monitor keeps capturing)
763833
- 🔄 Quick restore without reloading tool state

0 commit comments

Comments
 (0)