<ViewMoreText
text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
initialVisibleLines={3}
/>
You are creating a state that named isOpen or anything
Using svg for arrows and controlled by isOpen state
And contnet box with animation also controlled by isOpen
2
Answers
Here is the code that works for me, thanks to react-native-read-more-text library for the ios hack:
Example:
Android:
iOS:
Here just use mine collapse component
Here is the explainiton this code:
You are creating a state that named isOpen or anything
Using svg for arrows and controlled by isOpen state
And contnet box with animation also controlled by isOpen
you must install this package
npm i react-transition-group