7.2.2 • Published 7 months ago
@swc-uxp-wrappers/create-swc-uxp-react-app v7.2.2
create-swc-uxp-react-app
This package includes the global command for to create a UXP-SWC app in React context.
Prerequisites
- NodeJS >= 18.x
- Yarn v3.x (Quick steps to migrate from yarn 1.x)
- UXP v7.2
Quick Start
Use the
create-swc-uxp-react-app
to create the boiler plate projectnpx @swc-uxp-wrappers/create-swc-uxp-react-app <name-of-the-app> cd <name-of-the-app>
Make the config changes to define how node packages should be installed.
yarn config set nodeLinker "node-modules"
Install the dependancies
yarn install
Install respective components from
swc-uxp-wrapper
andswc-react
libraries.yarn add @swc-uxp-wrappers/checkbox yarn add @swc-react/checkbox yarn watch (and continue using the react components)
Once you have the project structure ready, you can import the component in for example App.js
import { Checkbox } from "@swc-react/checkbox";
And finally use the component
<Checkbox> I am a checkbox</Checkbox>