SearchBar text prop #676
-
Hello, Thank you very much for the wonderfull job you are doing with The Navigation Router. I have used Wix RNN and RN but i can confidently tell that by far The Navigation Router is the best interms of performace. I was very very impressed. I moved an app from Wix RNN to The Navigation Router and the performance was about 30 percent. I have an issue with the SearchBar. Can you explain wha the text prop is used for and if possible can you share a code with example of how to use it? Am very new to React Native. Thanks
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 13 replies
-
Hey @salisuabubakar. Thank you so much. You’ve really put a smile on my face. I’m surprised you only saw a 30% improvement ;) The text prop works the same as the value prop on the React Native TextInput component. You need const [text, onChangeText] = useState('');
<SearchBar
text={text}
onChangeText={onChangeText}>
</SearchBar> There’s a zoom sample that shows the SearchBar in action. I’ve recently updated the Any questions let me know. I’m always happy to help. |
Beta Was this translation helpful? Give feedback.
Hey @salisuabubakar. Thank you so much. You’ve really put a smile on my face. I’m surprised you only saw a 30% improvement ;)
The text prop works the same as the value prop on the React Native TextInput component. You need
useState
to hold the text.There’s a zoom sample that shows the SearchBar in action. I’ve recently updated the
SearchBar
component to support the Material 3 Search Bar from android. If you want to take advantage of this, like in the zoom sample, then you should update to the latest navigation-react-native and use a Material 3 Theme.Any questions let me know.…