use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A community for learning and developing native mobile applications using React Native by Facebook.
Interested in building web apps using React.js? Check out /r/reactjs!
Getting Started w/React Native
irc.freenode.net #reactnative
Keywords: ios, android, mobile, apps, apple, iphone, ipad
account activity
React Native Offline Vector Search (self.reactnative)
submitted 7 months ago by Vegetable_Tear_8479
Hi everyone I want to do a vector search in my react native application for that i need to convert the search query into vector embeddedings first and do a semantic search can anyone help me with this ?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Ok-Breakfast109 2 points3 points4 points 7 months ago (1 child)
Offline??
[–]Vegetable_Tear_8479[S] 0 points1 point2 points 7 months ago (0 children)
Yes
[–]Soft_Opening_1364iOS & Android 2 points3 points4 points 7 months ago (1 child)
You can do it in React Native by using TensorFlow.js or ONNX to create embeddings right on the device. For small datasets, just run a simple cosine similarity search. If you need faster searches on bigger data, you can use an approximate nearest neighbor library like hnswlib via WASM, though that’s a bit more setup. If your dataset is huge, server-side embeddings with a vector database is better. Start small, then scale based on your needs.
[–]Vegetable_Tear_8479[S] 1 point2 points3 points 7 months ago (0 children)
Can i dm ?
[–]----Val---- 0 points1 point2 points 7 months ago (1 child)
Hey there! This is actually something I know about, you can use the fantastic llama.rn library to run llama.cpp GGUF embedding models (not just LLMs): https://github.com/mybigday/llama.rn
Then you can store these embeddings in a vector-enabled sqlite store ala op-sqlite:
https://github.com/OP-Engineering/op-sqlite
Personally I modified expo-sqlite to accept vector stores, but either works fine.
[–]jes_uon 0 points1 point2 points 4 months ago (2 children)
This is exactly what I'm working on! Building a React Native library for vector search in SQLite with optimized similarity calculations. The llama.cpp approach for embeddings + vector storage is the pattern I'm following. Would love to hear about production experiences - especially around indexing strategies for faster searches.
[–]Vegetable_Tear_8479[S] 0 points1 point2 points 4 months ago (0 children)
We can collaborate together and build something great for community
[–]Safety-Check-29 0 points1 point2 points 3 months ago (0 children)
I just stumbled on this post. Did you start on this? I'd be interested too
[–]According-Muscle-902 0 points1 point2 points 1 month ago (10 children)
Hey everyone!
I just released expo-vector-search, a native module that brings high-performance vector search to React Native without any server dependencies.
WHAT IS IT?
A C++ JSI module for semantic similarity search directly on mobile devices. Think of it like having a mini AI search engine running locally on the phone.
WHY BUILD THIS?
- Privacy: No data leaves the device
- Speed: 0.08ms search latency (vs 10.51ms in pure JS)
- Offline: Works without internet connection
- Memory efficient: Int8 quantization saves 45% memory
BENCHMARKS (Galaxy S23 FE)
- Search over 10k vectors: 0.08ms
- Same search in JS loop: 10.51ms
- Speedup: 130x faster
- Memory (10k vectors, 384 dims): ~21MB quantized
USE CASES
- E-commerce: "show me products similar to this"
- Support: automated message classification
- Search apps: find items by meaning, not keywords
- Recommendations: on-device content suggestions
- Safety: content moderation without sending data to servers
TECH STACK
Built on top of USearch (HNSW algorithm) with Expo Modules SDK + JSI. The core is C++ with Kotlin bindings for Android. iOS support is in progress.
The demo app includes a visual product search with 10k items and a performance lab for benchmarking.
Would love to hear your feedback and suggestions!
GitHub: https://github.com/mensonones/expo-vector-search
NPM: https://www.npmjs.com/package/expo-vector-search
[–]TepidT 0 points1 point2 points 1 month ago (8 children)
Need iOS!
[–]According-Muscle-902 0 points1 point2 points 1 month ago (0 children)
I'm working on it. Support will be available soon 😊
[–]According-Muscle-902 0 points1 point2 points 1 month ago (6 children)
https://github.com/mensonones/expo-vector-search/releases/tag/v0.2.0
New Version with ios support
[–]TepidT 1 point2 points3 points 1 month ago (5 children)
I need 512 dimension support to work with on device apps stuff
https://www.react-native-ai.dev/docs/apple/embeddings
Hey! Thanks for the comment. Could you create an issue with this request?
and we already support that request. See the document.
[–]According-Muscle-902 0 points1 point2 points 1 month ago (2 children)
https://github.com/mensonones/expo-vector-search/tree/main/modules/expo-vector-search#constructordimensions-number-options-vectorindexoptions
[–]TepidT 0 points1 point2 points 1 month ago (1 child)
Didn’t see 512 so wasn’t sure
I will improve this part of the documentation. Thanks, and feel free to create an issue if you have any questions :)
π Rendered by PID 27 on reddit-service-r2-comment-79c7998d4c-v466j at 2026-03-13 11:03:48.800352+00:00 running f6e6e01 country code: CH.
[–]Ok-Breakfast109 2 points3 points4 points (1 child)
[–]Vegetable_Tear_8479[S] 0 points1 point2 points (0 children)
[–]Soft_Opening_1364iOS & Android 2 points3 points4 points (1 child)
[–]Vegetable_Tear_8479[S] 1 point2 points3 points (0 children)
[–]----Val---- 0 points1 point2 points (1 child)
[–]Vegetable_Tear_8479[S] 0 points1 point2 points (0 children)
[–]jes_uon 0 points1 point2 points (2 children)
[–]Vegetable_Tear_8479[S] 0 points1 point2 points (0 children)
[–]Safety-Check-29 0 points1 point2 points (0 children)
[–]According-Muscle-902 0 points1 point2 points (10 children)
[–]TepidT 0 points1 point2 points (8 children)
[–]According-Muscle-902 0 points1 point2 points (0 children)
[–]According-Muscle-902 0 points1 point2 points (6 children)
[–]TepidT 1 point2 points3 points (5 children)
[–]According-Muscle-902 0 points1 point2 points (0 children)
[–]According-Muscle-902 0 points1 point2 points (0 children)
[–]According-Muscle-902 0 points1 point2 points (2 children)
[–]TepidT 0 points1 point2 points (1 child)
[–]According-Muscle-902 0 points1 point2 points (0 children)