diff --git a/.github/workflows/example-apps.yml b/.github/workflows/example-apps.yml index f732af69c..0d8b20324 100644 --- a/.github/workflows/example-apps.yml +++ b/.github/workflows/example-apps.yml @@ -6,8 +6,8 @@ jobs: test-example: strategy: matrix: - node: [18, 20] - example: [basic, redux, react-navigation] + node: [18, 20, 22] + example: [basic, react-navigation] name: Test Example runs-on: ubuntu-latest timeout-minutes: 10 diff --git a/examples/redux/.gitignore b/examples/redux/.gitignore deleted file mode 100644 index 12605924e..000000000 --- a/examples/redux/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Yarn 4.x -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/sdks -!.yarn/versions diff --git a/examples/redux/App.js b/examples/redux/App.js deleted file mode 100644 index 2b9499cd0..000000000 --- a/examples/redux/App.js +++ /dev/null @@ -1,27 +0,0 @@ -import * as React from 'react'; -import { StyleSheet, View, StatusBar } from 'react-native'; -import { Provider } from 'react-redux'; -import configureStore from './store'; -import AddTodo from './components/AddTodo'; -import TodoList from './components/TodoList'; - -const store = configureStore(); - -export default function App() { - return ( - - - - - - - - ); -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - paddingTop: 32, - }, -}); diff --git a/examples/redux/README.md b/examples/redux/README.md deleted file mode 100644 index 4c0be973e..000000000 --- a/examples/redux/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# RNTL example app for Redux - -**Note: this example is stale and might not function correctly.** - -This example shows how to write integration tests using Redux without mocking it. diff --git a/examples/redux/actions/todoActions.js b/examples/redux/actions/todoActions.js deleted file mode 100644 index b83a37153..000000000 --- a/examples/redux/actions/todoActions.js +++ /dev/null @@ -1,25 +0,0 @@ -export const actions = { - ADD: '@ADD_TODO', - REMOVE: '@REMOVE_TODO', - MODIFY: '@MODIFY_TODO', - CLEAR: '@CLEAR_TODO', -}; - -export const addTodo = (todo) => ({ - type: actions.ADD, - payload: todo, -}); - -export const removeTodo = (id) => ({ - type: actions.REMOVE, - payload: { id }, -}); - -export const modifyTodo = (todo) => ({ - type: actions.MODIFY, - payload: todo, -}); - -export const clearTodos = () => ({ - type: actions.CLEAR, -}); diff --git a/examples/redux/babel.config.js b/examples/redux/babel.config.js deleted file mode 100644 index 4d710acf8..000000000 --- a/examples/redux/babel.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = function (api) { - api.cache(true); - return { - presets: ['module:metro-react-native-babel-preset'], - }; -}; diff --git a/examples/redux/components/AddTodo.js b/examples/redux/components/AddTodo.js deleted file mode 100644 index 54630f894..000000000 --- a/examples/redux/components/AddTodo.js +++ /dev/null @@ -1,72 +0,0 @@ -import * as React from 'react'; -import { Button, StyleSheet, Text, View, TextInput } from 'react-native'; -import { bindActionCreators } from 'redux'; -import { connect } from 'react-redux'; -import { addTodo } from '../actions/todoActions'; - -export function AddTodo(props) { - const [text, setText] = React.useState(''); - - const submitForm = () => { - const todo = { - id: props.todoLength + 1, - text, - date: new Date(), - }; - - props.addTodo(todo); - setText(''); - }; - - return ( - - Enter a text below to add a new todo - setText(t)} - placeholder="Enter the name of the repository here" - /> - -