From 6fe475daaf69288b5cc10a704aad7075d67ca12a Mon Sep 17 00:00:00 2001 From: Sasha Date: Wed, 8 Oct 2025 00:48:59 +0200 Subject: [PATCH] make it compatible with expo/next --- packages/react/src/WakuProvider.tsx | 3 ++- packages/react/src/types.ts | 2 +- packages/react/src/useCreateWaku.ts | 3 ++- packages/react/tsconfig.json | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/react/src/WakuProvider.tsx b/packages/react/src/WakuProvider.tsx index 6fcabbe643..557eb9be0c 100644 --- a/packages/react/src/WakuProvider.tsx +++ b/packages/react/src/WakuProvider.tsx @@ -1,5 +1,6 @@ +"use client"; import type { CreateNodeOptions, IWaku, LightNode } from "@waku/interfaces"; -import React from "react"; +import * as React from "react"; import type { CreateNodeResult, ReactChildrenProps } from "./types.js"; import { useCreateLightNode } from "./useCreateWaku.js"; diff --git a/packages/react/src/types.ts b/packages/react/src/types.ts index fbf70d9b50..2f9313b847 100644 --- a/packages/react/src/types.ts +++ b/packages/react/src/types.ts @@ -1,5 +1,5 @@ import type { IWaku } from "@waku/interfaces"; -import type React from "react"; +import type * as React from "react"; export type { CreateNodeOptions, AutoSharding } from "@waku/interfaces"; type HookState = { diff --git a/packages/react/src/useCreateWaku.ts b/packages/react/src/useCreateWaku.ts index 8924d642a6..7e99d1683a 100644 --- a/packages/react/src/useCreateWaku.ts +++ b/packages/react/src/useCreateWaku.ts @@ -1,6 +1,7 @@ +"use client"; import type { CreateNodeOptions, IWaku, LightNode } from "@waku/interfaces"; import { createLightNode } from "@waku/sdk"; -import React from "react"; +import * as React from "react"; import type { CreateNodeResult } from "./types.js"; diff --git a/packages/react/tsconfig.json b/packages/react/tsconfig.json index aa507d3e52..cbac7ad67b 100644 --- a/packages/react/tsconfig.json +++ b/packages/react/tsconfig.json @@ -4,6 +4,7 @@ "outDir": "dist/", "rootDir": "src", "tsBuildInfoFile": "dist/.tsbuildinfo", + "declarationDir": "dist", "jsx": "react" }, "include": ["src", "*.js"],