React Native offline-first: instant search in SQLite
I ship offline exercise search with SQLite FTS5. I keep typing smooth with a debounced query. I highlight matches and rank results, fast. I learned why %LIKE% is a trap on mobile. Context My fitnes...

Source: DEV Community
I ship offline exercise search with SQLite FTS5. I keep typing smooth with a debounced query. I highlight matches and rank results, fast. I learned why %LIKE% is a trap on mobile. Context My fitness app has ~400 exercises. Each has a name, muscle group, and a GIF. Search is the main screen. People open the app mid-workout. They type fast. They expect results instantly. I started with LIKE '%query%' on a normal SQLite table. Brutal. It worked with 40 rows. Then I imported the real dataset. Typing dropped frames. My “5-second set logging” promise fell apart because the search screen felt sticky. Also: offline-first. No server search. No Algolia. No “just hit an endpoint.” So I moved search to SQLite FTS5. Same local DB. Real full-text index. And I stopped doing work on every keystroke. 1) I stopped using LIKE. I indexed. LIKE feels simple. It’s also a full table scan when you wrap the query in %...%. On a phone. While React is trying to render. FTS5 fixed it. But only after I wired it co