Nhảy tới nội dung

Polyfill & Root Component

reactive/js use reflect-metadata to provide a polyfill for the decorator. This is required to use the decorator in your application. Please import polyfill before any other imports.

import '@lamvd0101/reactive-js';

// Your application imports

In the next step, you need use ReactReactive component as root component of your application. Because reactive/js use redux to store the state of the application. Don't worry, you don't need to know about redux to use reactive/js.

import {ReactReactive} from '@lamvd0101/reactive-js';

export default function Index() {
return (
<ReactReactive>
<YourApp />
</ReactReactive>
);
}