@microsoft/fast-react-wrapper
v0.3.25
Published
A utility for wrapping web components for use in React.
Downloads
224,041
Keywords
Readme
FAST React Wrapper
The fast-react-wrapper
package contains a utility that enables automatically wrapping Web Components in a React component for ease of integration into React projects.
Installation
From NPM
To install the fast-react-wrapper
library, use either npm
or yarn
as follows:
npm install --save @microsoft/fast-react-wrapper
yarn add @microsoft/fast-react-wrapper
Within your JavaScript or TypeScript code, you can then and use the wrapper like this:
import React from 'react';
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
const { wrap } = provideReactWrapper(React);
const MyComponent = wrap(MyComponent);
For additional wrapper settings and more information on integrating with Design Systems, see our integration docs.