React native - display chords over lyrics

(Nicolas Decayeux) #1


I’m working on a mobile app with react native to render music tabs (with chords over lyrics), and I do not achieve to put the chords at the right place efficiently. There is also another difficulty with the fact that two chords should not override. For instance with this example:

Cdim D
Ly   rics

Here I had to explode the word «lyrics» to be able to write the chords.
I have found a solution that creates a lot of Text components (around 2 per chord), but it is really really slow.

Do you have any idea how I could place the chords at the right position?

Thank you

Ps: Sorry for my poor english…