Skip to main content

A zero-fuss way to create non single page apps with react.

Project description

React Pages

A zero-fuss way to create non single page apps with react.
  • Zero Configuration required.
  • Go from development to production with ease.
  • Natively use react in django.

QuickStart

  • react-pages project poll_react_pages # create a project

  • cd poll_react_pages

  • react-pages page vote # create a page

  • react-pages develop # start development environent

  • react-pages deploy # deploy into production

Django Integration

React Pages allows you to access django template context variables inside react!

settings.py
INSTALLED_APPS = [
    ...
    'react_pages_django',
    ...
]

# Assuming your React Pages project is at BASE_DIR,
REACT_PAGES_PROJECT_DIR = os.path.join(BASE_DIR, 'poll_react_pages')
templates
{% load react_pages %}
...
{% render_react_page 'vote' %}
...

Now, you can just do

python manage.py react_pages develop

or, in production,

python manage.py react_pages deploy

That's it!

React Pages will pick-up the 'vote' page from 'poll_react_pages' project and do the nessecary work to make your react code available.

Feel free to access the global variable context from your react jsx code.

Yeah, That's the the django template context!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

react-pages-0.0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

react_pages-0.0.1-py2.py3-none-any.whl (4.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file react-pages-0.0.1.tar.gz.

File metadata

  • Download URL: react-pages-0.0.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for react-pages-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2492012152836d8c96400c480192c7c3e07e623e53856c4b268bd357840d3ced
MD5 201168a731b306cd9e1c7572401ca8ce
BLAKE2b-256 db71efcaca78b4faf79ddd541d5bf83b71fbcef9bfe10026c75e9bdaea342489

See more details on using hashes here.

File details

Details for the file react_pages-0.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for react_pages-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9218d26feef499dbd380f03f2550079d3bf80856778817f33d28f4ffd681f4c7
MD5 0ab5a0735632ee7793bde935878f1921
BLAKE2b-256 df8b63cc0f9e82ce131ff95c5c8cc1c848319aeb02a745a5c593e71da5f2527d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page