How we detect no of lines of the text component in react native to help in see more option, I worked OnTextLayout prop of text but it does not work.
Any solution?
Question posted in React native
The official React Native documentation can be found here.
The official React Native documentation can be found here.
2
Answers
You should always share the code that you’ve worked on even if it doesn’t work. So the community can guide to the right direction. Having said that this is tested code and it should work try this.
checkout this approach with using useCallback, this is optimum solution of my knowledge, showMore is the state for show show more option