N
N
Nikita Andreevich2020-01-09 02:37:41
React Native
Nikita Andreevich, 2020-01-09 02:37:41

What is the best way to implement data filtering?

Hello.
One screen, a form for filtering the list in the header, the rest of the screen space is occupied by the list.
I wondered how best to implement filtering (name, age), without reloading the page?
Maybe there are special methods in React Native? Or do it with pure JS?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Alexandrovich, 2020-01-09
@NikitosAndreevich

Well, you have 2 options
. The first option is if you have an api for searching, then by changing the search field you make a request to the server with a changed search query and then unload what the server returns to the user.
Second, if you do not have a search API, then you pull the data, then show the data, and when you change the search field, clean js filter the data and display it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question