Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/playground/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ node_modules/
.expo/
dist/
web-build/
expo-env.d.ts

# Native
.kotlin/
*.orig.*
*.jks
*.p8
Expand Down
1 change: 1 addition & 0 deletions apps/playground/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node-linker=hoisted
Binary file modified apps/playground/assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions apps/playground/babel.config.js

This file was deleted.

7 changes: 0 additions & 7 deletions apps/playground/index.js

This file was deleted.

8 changes: 8 additions & 0 deletions apps/playground/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { registerRootComponent } from "expo";

import App from "./src/app";

// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(App);
21 changes: 0 additions & 21 deletions apps/playground/metro.config.js

This file was deleted.

27 changes: 11 additions & 16 deletions apps/playground/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
{
"name": "@formbricks/demo-react-native",
"name": "playground",
"version": "1.0.0",
"main": "./index.js",
"main": "index.ts",
"scripts": {
"dev": "expo start",
"dev": "expo start --reset-cache",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"clean": "rimraf .turbo node_modules .expo"
},
"dependencies": {
"@formbricks/react-native": "workspace:*",
"@react-native-async-storage/async-storage": "2.1.0",
"expo": "52.0.28",
"expo-status-bar": "2.0.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-native": "0.76.6",
"react-native-webview": "13.12.5"
"@react-native-async-storage/async-storage": "2.1.2",
"expo": "~53.0.13",
"expo-status-bar": "~2.2.3",
"react": "19.0.0",
"react-native": "0.79.4"
},
"devDependencies": {
"@babel/core": "7.26.0",
"@types/react": "18.3.18",
"eslint": "8.57.0",
"typescript": "5.7.2"
"@babel/core": "^7.25.2",
"@types/react": "~19.0.10",
"typescript": "~5.8.3"
},
"private": true
}
19 changes: 12 additions & 7 deletions apps/playground/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export default function App(): JSX.Element {
display: "flex",
flexDirection: "column",
gap: 10,
}}>
}}
>
<Button
title="Trigger Code Action"
onPress={() => {
Expand All @@ -42,7 +43,7 @@ export default function App(): JSX.Element {
/>

<Button
title="Set User Id"
title="Set userId"
onPress={() => {
setUserId("random-user-id").catch((error: unknown) => {
// eslint-disable-next-line no-console -- logging is allowed in demo apps
Expand All @@ -69,10 +70,12 @@ export default function App(): JSX.Element {
<Button
title="Set User Attributes (single)"
onPress={() => {
setAttribute("testSingleAttr", "testSingleAttr").catch((error: unknown) => {
// eslint-disable-next-line no-console -- logging is allowed in demo apps
console.error("Error setting user attributes:", error);
});
setAttribute("testSingleAttr", "testSingleAttr").catch(
(error: unknown) => {
// eslint-disable-next-line no-console -- logging is allowed in demo apps
console.error("Error setting user attributes:", error);
}
);
}}
/>

Expand Down Expand Up @@ -101,7 +104,9 @@ export default function App(): JSX.Element {

<Formbricks
appUrl={process.env.EXPO_PUBLIC_APP_URL as string}
environmentId={process.env.EXPO_PUBLIC_FORMBRICKS_ENVIRONMENT_ID as string}
environmentId={
process.env.EXPO_PUBLIC_FORMBRICKS_ENVIRONMENT_ID as string
}
/>
</View>
);
Expand Down
4 changes: 2 additions & 2 deletions apps/playground/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true
},
"extends": "expo/tsconfig.base"
}
}
6 changes: 3 additions & 3 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"zod": "3.24.1"
},
"devDependencies": {
"@types/react": "18.3.1",
"@types/react": "19.0.14",
"@vercel/style-guide": "6.0.0",
"@vitest/coverage-v8": "3.1.1",
"react": "18.3.1",
"react-native": "0.74.5",
"react": "19.0.0",
"react-native": "0.79.4",
"terser": "5.37.0",
"vite": "6.2.5",
"vite-plugin-dts": "4.5.3",
Expand Down
Loading