Check out example codes for "drupal 8 HTML in type link". It will help you in understanding the concepts better.

Code Example 1

$link = [
  '#type' => 'link',
  '#title' => [
      '#type' => 'inline_template',
      '#template' => '{{ title }} <span class="icon-right-arrow"></span>',
      '#context' => [
        'title' => $title
      ],
  ],
  '#url' => Url::fromRoute('user.pass'),
];

Learn ReactJs, React Native from akashmittal.com