Skip to content

Commit 68c540e

Browse files
committed
chore: migrate to react 19
1 parent 25e9cac commit 68c540e

File tree

8 files changed

+12754
-18410
lines changed

8 files changed

+12754
-18410
lines changed

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"@react-native/eslint-config": "^0.72.2",
5656
"@release-it/conventional-changelog": "^5.0.0",
5757
"@types/jest": "^28.1.2",
58-
"@types/react": "~17.0.21",
58+
"@types/react": "^19.1.0",
5959
"@types/react-native": "0.70.0",
6060
"commitlint": "^17.0.2",
6161
"del-cli": "^5.0.0",
@@ -64,23 +64,24 @@
6464
"eslint-plugin-prettier": "^4.0.0",
6565
"jest": "^28.1.1",
6666
"prettier": "^2.0.5",
67-
"react": "18.2.0",
67+
"react": "^19.1.0",
6868
"react-native": "0.72.6",
6969
"react-native-builder-bob": "^0.23.1",
7070
"react-native-webview": "^13.6.2",
7171
"release-it": "^15.0.0",
7272
"typescript": "^5.0.2"
7373
},
7474
"resolutions": {
75-
"@types/react": "17.0.21"
75+
"@types/react": "^18.0.0 || ^19.0.0"
7676
},
7777
"peerDependencies": {
78-
"react": "*",
78+
"react": ">=18.0.0",
7979
"react-native": "*",
8080
"react-native-webview": "*"
8181
},
8282
"workspaces": [
83-
"example"
83+
"example",
84+
"examples/SimpleExample"
8485
],
8586
"packageManager": "[email protected]",
8687
"engines": {
@@ -160,7 +161,7 @@
160161
]
161162
},
162163
"dependencies": {
163-
"react-redux": "^8.1.3",
164+
"react-redux": "^9.2.0",
164165
"redux": "^4.2.1"
165166
}
166-
}
167+
}

src/components/IterateProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface Props {
1515
children: React.ReactNode;
1616
}
1717

18-
const IterateProvider = ({ children }: Props) => {
18+
const IterateProvider = ({ children }: Props): React.ReactNode => {
1919
// Get safe area
2020
const safeArea =
2121
SafeArea.provider != null

src/components/Prompt/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface Props {
1818
survey?: Survey;
1919
}
2020

21-
const PromptButton: (Props: Props) => JSX.Element = ({
21+
const PromptButton: (Props: Props) => React.ReactElement = ({
2222
color,
2323
colorDark,
2424
onPress,

src/components/Prompt/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const ANIMATION_DURATION = 300;
3636
const DISMISSED_POSITION = 500;
3737
const DISPLAYED_POSITION = 0;
3838

39-
const Prompt: (Props: Props) => JSX.Element = ({
39+
const Prompt: (Props: Props) => React.ReactElement = ({
4040
dispatchShowSurvey,
4141
onDismiss,
4242
safeAreaInsets,

src/components/PromptOrSurvey.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type Props = {
2727
survey?: Survey;
2828
};
2929

30-
const PromptOrSurvey: (Props: Props) => JSX.Element | null = ({
30+
const PromptOrSurvey: (Props: Props) => React.ReactElement | null = ({
3131
dispatchDismiss,
3232
dispatchSafeAreaInsets,
3333
safeAreaInsets,

src/components/Survey.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type Props = {
4646
userAuthToken?: string;
4747
};
4848

49-
const SurveyView: (Props: Props) => JSX.Element = ({
49+
const SurveyView: (Props: Props) => React.ReactElement = ({
5050
companyAuthToken,
5151
displayedSurveyResponseId,
5252
eventTraits,

src/markdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Markdown {
1515
Render(
1616
value: string,
1717
style: MarkdownInterfacePropsStyle
18-
): JSX.Element | null {
18+
): React.ReactElement | null {
1919
const MarkdownProvider = this.provider;
2020

2121
if (MarkdownProvider != null) {

0 commit comments

Comments
 (0)