aboutsummaryrefslogtreecommitdiff
path: root/integration/snippets/react-context-value-func.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'integration/snippets/react-context-value-func.tsx')
-rw-r--r--integration/snippets/react-context-value-func.tsx34
1 files changed, 0 insertions, 34 deletions
diff --git a/integration/snippets/react-context-value-func.tsx b/integration/snippets/react-context-value-func.tsx
deleted file mode 100644
index 5f38a5d1c..000000000
--- a/integration/snippets/react-context-value-func.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import React from "react";
-
-const Context = React.createContext({});
-
-const ContextProvider = ({ children }) => {
- const [cb, setCB] = React.useState(function () {});
- const foo = true;
-
- return <Context.Provider value={cb}>{children(foo)}</Context.Provider>;
-};
-
-const ContextValue = ({}) => (
- <Context.Consumer>
- {(foo) => {
- if (foo) {
- return <div>Worked!</div>;
- }
-
- throw `Value "${foo}"" should be true`;
- }}
- </Context.Consumer>
-);
-
-const TestComponent = () => (
- <ContextProvider>
- <ContextValue />
- </ContextProvider>
-);
-
-export function test() {
- const foo = <TestComponent />;
-
- return testDone(import.meta.url);
-}
>-0/+0 2022-06-22cleanup websocket testGravatar Jarred Sumner 1-3/+6 2022-06-22Fix `WebSocket` when HTTP server is not runningGravatar Jarred Sumner 14-38/+103 2022-06-22Update build-idGravatar Jarred Sumner 1-1/+1 2022-06-22cleanupGravatar Jarred Sumner 6-719/+3 2022-06-22Update index.d.tsGravatar Jarred Sumner 1-0/+1 2022-06-22types for `bun:jsc`Gravatar Jarred Sumner 2-1/+37 2022-06-22Slightly customize the `events` polyfill so it uses ESMGravatar Jarred Sumner 1-1/+522 2022-06-22Fix memory bugs in escapeHTML & arrayBufferToStringGravatar Jarred Sumner 1-65/+61