This code currently gets 'dynamic words' from the CMS and changes those to span's, which get a eventlistener on it whereas you click on them, something happens. But currently it only gets the last 'dynamic word' from the CMS, instead of all of them. I was thinking about putting it in a loop but I don't think that will work.
Does someone see where the problem is?
CodeSandbox:
https://codesandbox.io/s/musing-wozniak-zzwps2?file=/src/App.js