Skip to content

Component Initial HTML #27

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

Closed
wants to merge 3 commits into from

Conversation

Archmonger
Copy link
Contributor

@Archmonger Archmonger commented Nov 17, 2021

The idea of this PR is to allow for customizable initial HTML.

This is useful for...

  • Showing a simple loader/message in situations where a websocket connection could not be formed (Message display can be delayed via CSS).
  • Can be used to run simple scripts on the component div.

This is different than an IDOM Core idom.component fallback=... that we have discussed due to the fact that this implementation fallback has no WS reliance.

@Archmonger
Copy link
Contributor Author

Archmonger commented Nov 17, 2021

I want to mention that this PR is currently nonfunctional due to mountViewToElement wiping the inner contents of the component div on WS connect. In order for this PR to work, this behavior in IDOM Core would need to be changed to clear the HTML on first render instead.

Mostly opening this PR as a discussion as whether or not this concept can/should be pursued.

There are several situations where it'd be useful to have a fallback that is not reliant on websockets.

@Archmonger Archmonger changed the title Component HTML Fallback Component Initial HTML Nov 17, 2021
@Archmonger Archmonger self-assigned this Nov 17, 2021
@rmorshea
Copy link
Contributor

rmorshea commented Jan 12, 2022

I think this can be addressed once reactive-python/reactpy#581 is completed.

@Archmonger
Copy link
Contributor Author

I'm going to close this in prioritization of SSR within IDOM v3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants