create-instantsearch-app 5.1.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [5.1.1](https://github.com/algolia/create-instantsearch-app/compare/5.1.0...5.1.1) (2022-01-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **react-native:** update template and related dependencies ([#546](https://github.com/algolia/create-instantsearch-app/issues/546)) ([858d33f](https://github.com/algolia/create-instantsearch-app/commit/858d33fb01272e8a13964a739c247743cbd855dc))
7
+
8
+
9
+
1
10
  # [5.1.0](https://github.com/algolia/create-instantsearch-app/compare/5.0.1...5.1.0) (2021-12-14)
2
11
 
3
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-instantsearch-app",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "license": "MIT",
5
5
  "description": "⚡️ Build InstantSearch apps at the speed of thought",
6
6
  "keywords": [
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { StyleSheet, View, SafeAreaView, StatusBar } from 'react-native';
3
- import algoliasearch from 'algoliasearch/reactnative';
3
+ import algoliasearch from 'algoliasearch';
4
4
  import { InstantSearch } from 'react-instantsearch-native';
5
5
  import SearchBox from './src/SearchBox';
6
6
  import InfiniteHits from './src/InfiniteHits';
@@ -21,33 +21,18 @@ const styles = StyleSheet.create({
21
21
  },
22
22
  });
23
23
 
24
- class App extends React.Component {
25
- root = {
26
- Root: View,
27
- props: {
28
- style: {
29
- flex: 1,
30
- },
31
- },
32
- };
33
-
34
- render() {
35
- return (
36
- <SafeAreaView style={styles.safe}>
37
- <StatusBar barStyle="light-content" />
38
- <View style={styles.container}>
39
- <InstantSearch
40
- searchClient={searchClient}
41
- indexName="{{indexName}}"
42
- root={this.root}
43
- >
44
- <SearchBox />
45
- <InfiniteHits />
46
- </InstantSearch>
47
- </View>
48
- </SafeAreaView>
49
- );
50
- }
51
- }
24
+ const App = () => {
25
+ return (
26
+ <SafeAreaView style={styles.safe}>
27
+ <StatusBar barStyle="light-content" />
28
+ <View style={styles.container}>
29
+ <InstantSearch searchClient={searchClient} indexName="{{indexName}}">
30
+ <SearchBox />
31
+ <InfiniteHits />
32
+ </InstantSearch>
33
+ </View>
34
+ </SafeAreaView>
35
+ );
36
+ };
52
37
 
53
38
  export default App;
@@ -2,6 +2,6 @@
2
2
  "expo": {
3
3
  "name": "{{name}}",
4
4
  "slug": "{{name}}",
5
- "sdkVersion": "32.0.0"
5
+ "sdkVersion": "44.0.0"
6
6
  }
7
7
  }
@@ -10,22 +10,23 @@
10
10
  "eject": "expo eject"
11
11
  },
12
12
  "dependencies": {
13
- "algoliasearch": "3.32.1",
14
- "expo": "32.0.6",
15
- "prop-types": "15.7.2",
16
- "react": "16.5.0",
13
+ "algoliasearch": "4.11.0",
14
+ "expo": "44.0.3",
15
+ "prop-types": "15.8.0",
16
+ "react": "17.0.2",
17
17
  "react-instantsearch-native": "{{libraryVersion}}",
18
- "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz"
18
+ "react-native": "0.64.3"
19
19
  },
20
20
  "devDependencies": {
21
- "babel-preset-expo": "5.2.0",
22
- "eslint": "5.7.0",
23
- "eslint-config-algolia": "13.2.3",
24
- "eslint-config-prettier": "3.6.0",
25
- "eslint-plugin-import": "2.18.2",
26
- "eslint-plugin-prettier": "3.1.0",
27
- "eslint-plugin-react": "7.13.0",
28
- "expo-cli": "2.21.2",
29
- "prettier": "1.19.1"
21
+ "@babel/core": "7.16.5",
22
+ "babel-preset-expo": "9.0.2",
23
+ "eslint": "8.5.0",
24
+ "eslint-config-algolia": "20.0.0",
25
+ "eslint-config-prettier": "8.3.0",
26
+ "eslint-plugin-import": "2.25.3",
27
+ "eslint-plugin-prettier": "4.0.0",
28
+ "eslint-plugin-react": "7.28.0",
29
+ "expo-cli": "5.0.3",
30
+ "prettier": "2.5.1"
30
31
  }
31
32
  }
@@ -20,12 +20,12 @@ const styles = StyleSheet.create({
20
20
  },
21
21
  });
22
22
 
23
- const InfiniteHits = ({ hits, hasMore, refine }) => (
23
+ const InfiniteHits = ({ hits, hasMore, refineNext }) => (
24
24
  <FlatList
25
25
  data={hits}
26
26
  keyExtractor={item => item.objectID}
27
27
  ItemSeparatorComponent={() => <View style={styles.separator} />}
28
- onEndReached={() => hasMore && refine()}
28
+ onEndReached={() => hasMore && refineNext()}
29
29
  renderItem={({ item }) => (
30
30
  <View style={styles.item}>
31
31
  {{#if attributesToDisplay}}
@@ -50,7 +50,7 @@ const InfiniteHits = ({ hits, hasMore, refine }) => (
50
50
  InfiniteHits.propTypes = {
51
51
  hits: PropTypes.arrayOf(PropTypes.object).isRequired,
52
52
  hasMore: PropTypes.bool.isRequired,
53
- refine: PropTypes.func.isRequired,
53
+ refineNext: PropTypes.func.isRequired,
54
54
  };
55
55
 
56
56
  export default connectInfiniteHits(InfiniteHits);
@@ -6,6 +6,7 @@ import { connectSearchBox } from 'react-instantsearch-native';
6
6
  const styles = StyleSheet.create({
7
7
  container: {
8
8
  padding: 16,
9
+ backgroundColor: '#252b33',
9
10
  },
10
11
  input: {
11
12
  height: 48,