Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/askbeka/react-trie-search

react search component consuming trie for efficent search
https://github.com/askbeka/react-trie-search

Last synced: 4 days ago
JSON representation

react search component consuming trie for efficent search

Awesome Lists containing this project

README

        

# react-trie-search
react search component consuming trie for efficent search

## Usage
#### Consuming array of strings
```
import Search from 'react-trie-search';

render() {
return console.log(result)}}/>
}
```

#### Consuming array of objects
```
import Search from 'react-trie-search';

const getter = ({value}) => value;

render() {
return console.log(result)}}/>
}
```

#### Consuming Trie instance
```
import Search, {Trie} from 'react-trie-search';

const getter = ({value}) => value;

const trie = new Trie([{id: 0, value: 'some value'}, {id: 1, value: 'some value 1'}], getter);

render() {
return console.log(result)}}/>
}
```