# logicore-react-pages

> ReactJS-based declarative forms library

Latest version **1.0.0-alpha.10** (published 2023-02-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install logicore-react-pages
pnpm add logicore-react-pages
yarn add logicore-react-pages
bun add logicore-react-pages
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-alpha.10 |
| Published | 2023-02-09 |
| First published | 2022-09-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 6 |
| Unpacked size | 40.1 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Andrei Boltachev |
| Maintainers | andrewboltachev |

## Links

- npm: https://www.npmjs.com/package/logicore-react-pages
- Repository: https://github.com/logicore-project/logicore-react-pages
- npm.io page: https://npm.io/package/logicore-react-pages

## Dependencies (6)

- [axios](https://npm.io/package/axios.md) ^0.27.2
- [i18next](https://npm.io/package/i18next.md) ^22.4.9
- [react-i18next](https://npm.io/package/react-i18next.md) ^12.1.5
- [react-router-dom](https://npm.io/package/react-router-dom.md) ^6.4.1
- [react-notifications](https://npm.io/package/react-notifications.md) ^1.7.4
- [i18next-browser-languagedetector](https://npm.io/package/i18next-browser-languagedetector.md) ^7.0.1

## Recent versions

- 1.0.0-alpha.10 (latest) — 2023-02-09
- 1.0.0-alpha.9 — 2022-09-30
- 1.0.0-alpha.8 — 2022-09-30
- 1.0.0-alpha.7 — 2022-09-30
- 1.0.0-alpha.6 — 2022-09-30
- 1.0.0-alpha.5 — 2022-09-30
- 1.0.0-alpha.4 — 2022-09-30
- 1.0.0-alpha.3 — 2022-09-30
- 1.0.0-alpha.2 — 2022-09-30
- 1.0.0-alpha.1 — 2022-09-30

## README

# logicore-react-pages

[PRG](https://en.wikipedia.org/wiki/Post/Redirect/Get)-like approach for React + Django AJAX apps

Used together with: [Django counterpart](https://github.com/Logicore-project/logicore-django-react-pages)

## Usage

1. Perform installation and configuration of `logicore-django-react` and `logicore-django-react-pages`: https://github.com/Logicore-project/logicore-django-react-pages#usage

2. Install:

```bash
yarn add logicore-react-pages
```

3. Create minimal starter `App.js`:

```javascript
import React from "react";
import { App, mainComponents, wrapperComponents } from "logicore-react-pages";

const MainWrapper = ({ result, onChange }) => {
  const Component = mainComponents[result?.template];
  return (
    <>
      {Component && result && <Component {...{ ...result, onChange }} />}
    </>
  );
};

Object.assign(wrapperComponents, {
    MainWrapper,
});


const HomeView = (props) => {
  return <div>Hello, {props.name}</div>;
};

Object.assign(mainComponents, {
    HomeView,
});

export default App;
```


## License

MIT © [andrewboltachev](https://github.com/andrewboltachev)

---
_Source: https://npm.io/package/logicore-react-pages · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
