Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support configure() without a component=... #1071

Closed
Archmonger opened this issue Jun 19, 2023 · 3 comments
Closed

Support configure() without a component=... #1071

Archmonger opened this issue Jun 19, 2023 · 3 comments
Labels
priority-1-high Should be resolved ASAP. type-revision About a change in functionality or behavior

Comments

@Archmonger
Copy link
Contributor

Current Situation

All reactpy.backend.*.configure(...) calls currently require a component. However, our main method telling users how to use ReactPy should involve using our template tag.

Proposed Actions

Either remove component as a parameter, or make it an optional parameter.

Frankly, the current method of artificially setting up an index route is useless or gimmicky at best.

@Archmonger Archmonger added priority-1-high Should be resolved ASAP. type-revision About a change in functionality or behavior labels Jun 19, 2023
@rmorshea
Copy link
Collaborator

rmorshea commented Jun 19, 2023

However, our main method telling users how to use ReactPy should involve using our #653... Frankly, the current method of artificially setting up an index route is useless or gimmicky at best.

Can you give some more detail around the problems with the current implementation and how using using template tags would solve them?

@Archmonger
Copy link
Contributor Author

Archmonger commented Jun 19, 2023

Mounting a configure(... , component = ...) at the index route clashes with that "embed within existing projects" concept. We're indirectly suggesting to users "You either create your whole app in ReactPy, or you don't". But unfortunately, the template tag is needed so we don't force users to write their own JS clients.

Right now there is a lot of necessary SPA browser features that can't be done with ReactPy.

The configure() function is ineffective for embedding within existing applications compared to reactpy-django. Our SPA support isn't really useable until we have Python support for

  • File Uploads
  • ReactJS packages (in a convenient way)
  • Browser cookies
  • Sessions
  • IndexDB
  • WebSQL
  • Push Messaging
  • Background Sync
  • Forward Cache
  • Local Storage
  • Service Workers
  • Web manifests

Practically everything under Chrome Devtools -> Application is going to need native integration if we want to advertise SPAs as a realistic dev scenario. Getting there is going to require a lot of dev hours, so we won't reach it quickly.

Since our SPA support is practically unusable, the only "real world" use cases we can actually support is embedding via template tags.

@Archmonger
Copy link
Contributor Author

Closing this in favor of #1110

@Archmonger Archmonger closed this as not planned Won't fix, can't repro, duplicate, stale Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-1-high Should be resolved ASAP. type-revision About a change in functionality or behavior
Projects
None yet
Development

No branches or pull requests

2 participants