swellui
v1.0.7-beta.3
Published
<h1 align="center"> swell UI </h1> https://swellui.com
Downloads
9
Readme
Components to build front-end experiences using https://swell.is
Documentation
Installing
npm install swellui
Packages
| Name | Version | Downloads |
| :------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------: |
| swellUi
| | |
Getting Started
Wrap the app with SwellProvier
.
import { CommerceProvider } from "swellui";
function MyApp() {
return (
<CommerceProvider>
<App ... >
<Routes ... >
<Script ... >
</CommerceProvider>
)
}
Now you can use CommerceContext
from anywhere inside App or Routes.
import { CommerceContext } from "swellui";
function Product() {
const {
store: { commerce, products },
} = useContext(CommerceContext);
}
Updating the library (Dev)
- After new updates, the package version should be updated in
package.json
and publish to npm.