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
useFormState: Hash the component key path for more compact output (#27397)
To support MPA-style form submissions, useFormState sends down a key
that represents the identity of the hook on the page. It's based on the
key path of the component within the React tree; for deeply nested
hooks, this keypath can become very long. We can hash the key to make it
shorter.
Adds a method called createFastHash to the Stream Config interface.
We're not using this for security or obfuscation, only to generate a
more compact key without sacrificing too much collision resistance.
- In Node.js builds, createFastHash uses the built-in crypto module.
- In Bun builds, createFastHash uses Bun.hash. See:
https://bun.sh/docs/api/hashing#bun-hash
I have not yet implemented createFastHash in the Edge, Browser, or FB
(Hermes) stream configs because those environments do not have a
built-in hashing function that meets our requirements. (We can't use the
web standard `crypto` API because those methods are async, and yielding
to the main thread is too costly to be worth it for this particular use
case.) We'll likely use a pure JS implementation in those environments;
for now, they just return the original string without hashing it. I'll
address this in separate PRs.
DiffTrain build for commit 2b3d582.
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23998,7 +23998,7 @@ function createFiberRoot(
23998
23998
return root;
23999
23999
}
24000
24000
24001
-
var ReactVersion = "18.3.0-canary-1f4936660-20230920";
24001
+
var ReactVersion = "18.3.0-canary-2b3d58268-20230920";
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8620,7 +8620,7 @@ var devToolsConfig$jscomp$inline_1028 = {
8620
8620
throwError("TestRenderer does not support findFiberByHostInstance()");
8621
8621
},
8622
8622
bundleType: 0,
8623
-
version: "18.3.0-canary-1f4936660-20230920",
8623
+
version: "18.3.0-canary-2b3d58268-20230920",
8624
8624
rendererPackageName: "react-test-renderer"
8625
8625
};
8626
8626
varinternals$jscomp$inline_1227={
@@ -8651,7 +8651,7 @@ var internals$jscomp$inline_1227 = {
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9046,7 +9046,7 @@ var devToolsConfig$jscomp$inline_1070 = {
9046
9046
throwError("TestRenderer does not support findFiberByHostInstance()");
9047
9047
},
9048
9048
bundleType: 0,
9049
-
version: "18.3.0-canary-1f4936660-20230920",
9049
+
version: "18.3.0-canary-2b3d58268-20230920",
9050
9050
rendererPackageName: "react-test-renderer"
9051
9051
};
9052
9052
varinternals$jscomp$inline_1268={
@@ -9077,7 +9077,7 @@ var internals$jscomp$inline_1268 = {
0 commit comments