Skip to content

Commit 39d4214

Browse files
committed
feat: Explore microprofiler hooks with _G.__REACT_MICROPROFILER_LEVEL
1 parent 892fd61 commit 39d4214

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

modules/react-reconciler/src/RobloxReactProfiling.luau

+1-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,7 @@ type FiberRoot = ReactInternalTypes.FiberRoot
2626
local LEVEL_ROOTS = 1 -- Level 1: Roots + Commit time
2727
local LEVEL_FIBERS = 10 -- Level 10: Individual Fiber "units of work"
2828

29-
local loadedFlag, ReactMicroprofilerLevel = pcall(function()
30-
return game:DefineFastInt("ReactMicroprofilerLevel", 0)
31-
end)
32-
if not loadedFlag then
33-
ReactMicroprofilerLevel = 0
34-
end
29+
local ReactMicroprofilerLevel = _G.__REACT_MICROPROFILER_LEVEL or 0
3530

3631
export type Marker = {
3732
id: string,

scripts/build-wally-package.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ rm -rf roblox/node_modules
66

77
mkdir -p roblox
88

9-
cp -rL node_modules/ roblox/
9+
cp -rL node_modules/ roblox/node_modules/
1010

1111
./scripts/remove-tests.sh roblox/node_modules
1212

0 commit comments

Comments
 (0)