Issues Upgrading react-instantsearch-dom to react-instantsearch
TLDR Akash has problems upgrading react-instantsearch-dom to react-instantsearch and gets an error for connectSortBy. Kishore Nallan advises creating a GitHub issue.
Oct 31, 2023 (1 month ago)
Akash
05:28 AMimport { connectSortBy } from 'react-instantsearch';
function SortBy({ items, refine, createURL }) {
return (
<div style={{fontSize:'0.89rem',fontWeight:'bold',padding:"0.2rem 0.2rem"}}>
<span style={{marginRight:'1rem'}}>Sort By</span>
{items.map(item => (
<span
key={item.value}
style={{ cursor:'pointer',color: item.isRefined ? '#2248AE' : '',marginRight:"1rem",borderBottom: item.isRefined ? '2px solid #2248AE' : '' }}
onClick={event => {
event.preventDefault();
refine(item.value);
}}
>
{item.label}
</span>
))}
</div>
)
}
const CustomSortBy = connectSortBy(SortBy);
export default CustomSortBy
Akash
05:29 AMKishore Nallan
05:30 AMTypesense
Indexed 3015 threads (79% resolved)
Similar Threads
Issues with React-InstantSearch and Typesense-InstantSearch-Adapter
Gines experienced errors with react-instantsearch's OrderBy function when using typesense-instantsearch-adapter. Jason suggested naming the item values as per a specific format.
Connecting React Instant Search with Typesense Adapter
KARTHICK sought help with an error when using Typesense Adapter for React Instant Search. Jason advised substituting import statements. After uninstalling the react-instantsearch-dom package, KARTHICK resolved the issue.
Issues with Typesense Frontend Search Integration
Akash experienced issues integrating Typesense into their frontend search, particularly with their search box. Jason guided them to troubleshoot, eventually identifying the issue to be with react-instantsearch-dom and suggesting a downgrade to react 17, which resolved the issue.