본문으로 건너뛰기

Installation

You can install x-view-model from NPM or Yarn, or you can embed the directly from a github page.

Package Manager


npm install --save x-view-model@latest

# or:

yarn add x-view-model@latest

CDN


You can include x-view-model from github page.

<script src="https://shk1447.github.io/x-view-model/xvm.js"></script>

The variable XState will be available globally, which will give you access to the top-level exports.

const { registViewModel, registViewFlow } = xvm; // global variable: window.xvm

const viewModel = registViewModel({
// ...
});