jsdf/react-native-htmlview

[HELP] Does not render nested components?

wzahedi opened this issue · 0 comments

Hi, I am trying to use renderNode to render a simple Text inside a TouchableOpacity based on a specific tag, however it does not render.

It does however render when I do not enclose the Text component inside anything. However this does not work for my use case.

Apologies if I am misunderstanding something in advanced. Please advise, thanks.

function renderNode(node, index, siblings, parent, defaultRenderer) {
      if (node.name === 'mention') {
        return (
          <TouchableOpacity>
            <Text
              style={{
                color: '#0086ed',
                fontWeight: '600',
              }}>
              {node.attribs['data-name']}
            </Text>
          </TouchableOpacity>
        );
      }
}