阿尔及利亚即时搜索分页不起作用

时间:2019-05-19 08:38:03

标签: react-native pagination expo algolia instantsearch.js

refine()不能在本机运行

const InfiniteHits = ({ hits, hasMore, refine }) => {
  return <FlatList
    data={hits}
    keyExtractor={item => item.objectID}
    onEndReached={() => refine()}
    renderItem={({ item }) => (
      <CardListingItem item={item}/> 
    )}
  />
}

我尝试了使用connectPagination的另一种替代方法,该方法也不起作用:

const Pagination = ({refine}) => {
  return <Button
    title="more"
    onPress={() => refine()}
  />
}
export const ConnectedPagination = connectPagination(Pagination)

版本:

  "algoliasearch": "^3.33.0", 
  "react-instantsearch-native": "^5.6.0", 

出什么问题了?

0 个答案:

没有答案