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 +9 -0
- package/package.json +1 -1
- package/src/templates/React InstantSearch Native/App.js.hbs +14 -29
- package/src/templates/React InstantSearch Native/app.json +1 -1
- package/src/templates/React InstantSearch Native/package.json +15 -14
- package/src/templates/React InstantSearch Native/src/InfiniteHits.js.hbs +3 -3
- package/src/templates/React InstantSearch Native/src/SearchBox.js.hbs +1 -0
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
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, View, SafeAreaView, StatusBar } from 'react-native';
|
|
3
|
-
import algoliasearch from 'algoliasearch
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
style
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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;
|
|
@@ -10,22 +10,23 @@
|
|
|
10
10
|
"eject": "expo eject"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"algoliasearch": "
|
|
14
|
-
"expo": "
|
|
15
|
-
"prop-types": "15.
|
|
16
|
-
"react": "
|
|
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": "
|
|
18
|
+
"react-native": "0.64.3"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"babel
|
|
22
|
-
"
|
|
23
|
-
"eslint
|
|
24
|
-
"eslint-config-
|
|
25
|
-
"eslint-
|
|
26
|
-
"eslint-plugin-
|
|
27
|
-
"eslint-plugin-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
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,
|
|
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 &&
|
|
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
|
-
|
|
53
|
+
refineNext: PropTypes.func.isRequired,
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
export default connectInfiniteHits(InfiniteHits);
|