user14232549
user14232549

Reputation: 413

How to use LIKE in react-firestore?

I can't figure out how to use the LIKE operator on Firestore with React-redux-firebase.

I would like something similar to this:

Select * from countries where name LIKE %xico% //RESULT = Mexico

I tried the following:

import { firestoreConnect } from 'react-redux-firebase'

var name = 'xico'

export default compose(
  connect(mapStateToProps),firestoreConnect([{ collection : 'countries', orderBy :'name',startAt:name,endAt:name+'\uf8ff'}]) 
)(Dashboard);

But, it does not work.

Upvotes: 3

Views: 244

Answers (0)

Related Questions