1

I imported all necessary libs.

import "@microsoft/mgt";
import "@microsoft/teams-js"

put tag MgtTeamsChannelPicker into my render section

render() {
  return (
    <MgtTeamsChannelPicker></MgtTeamsChannelPicker>    
  );
}

than i got an error. enter image description here

Alexey Litvin
  • 33
  • 1
  • 7

1 Answers1

2

Due to how react handles custom elements, they must be referenced differently. Alternatively you can use our wrapper here:

https://github.com/nmetulev/mgt-react

which will allow you to reference the component in the following way:

import { TeamsChannelPicker } from 'mgt-react';
<TeamsChannelPicker></TeamsChannelPicker>

quick note: The names of the React components are in PascalCase and do not include the Mgt prefix

Nic Vogt
  • 261
  • 1
  • 6