@wq/react is a renderer plugin for @wq/app that seamlessly integrates with the React and React Native frameworks. @wq/react provides a number of default components and hooks to facilitate rapid deployment of applications backed by @wq/app’s storage, data model, routing, and syncing engines (@wq/store, @wq/model, @wq/router, and @wq/outbox, respectively.)
@wq/react is meant to be used with @wq/material, which provides a collection of ready-to-use Material Design interface components.
wq.app for PyPI
python3 -m venv venv # create virtual env (if needed) . venv/bin/activate # activate virtual env python3 -m pip install wq # install wq framework (wq.app, wq.db, etc.) # pip install wq.app # install wq.app only
@wq/react for npm
npm install @wq/material # install @wq/material and @wq/react and deps # npm install @wq/react # install only @wq/react and deps
The wq.js build provided by wq.app includes @wq/react and @wq/material by default. So, you do not need to explicitly register @wq/react when using wq.app for PyPI.
When using @wq/app for npm, @wq/react should be registered as a plugin, either directly or indirectly via @wq/material.
import app from '@wq/app'; import material from '@wq/material'; app.use(material); // Automatically registers @wq/react app.init(...);
@wq/react registers a complete set of components corresponding to @wq/app’s data model and URL structure. The components are grouped into four categories:
|components||General components (List, Table, Button, etc.)|
Many of @wq/react’s general components, and all of its icon and input components, are placeholders meant to be overridden by @wq/material. You can override both @wq/react and @wq/material’s components by registering a custom components plugin with the corresponding key.
@wq/react also provides named exports of a some components for use in custom views. In general, @wq/react provides named exports of components unique to @wq/react; those intended to be overridden by @wq/material are generally not provided as named exports.
@wq/react exports a number of React hooks that can be used to access various parts of the application state and plugin framework.
The source code for @wq/react is in the wq.app repository.