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

Isomorphic rendering? #9

Closed
DjebbZ opened this issue Feb 11, 2019 · 8 comments
Closed

Isomorphic rendering? #9

DjebbZ opened this issue Feb 11, 2019 · 8 comments

Comments

@DjebbZ
Copy link

DjebbZ commented Feb 11, 2019

Hello,

It's unclear from the Readme (and the Medium post). Does hicada supoort rendering the same component in both CLJ to a string and in CLJS ? We're using rum in a isomorphic setup and I'm interested to try out hicada.

@DjebbZ
Copy link
Author

DjebbZ commented Feb 11, 2019

I've read briefly the code and I have my answers. To be able to use hicada in an isomorphic setup, I need to write my own html macro that emits the hiccup code as is in CLJ and does its job normally for CLJS. Which means my own macro should probably use something like macrovich to detect for which environment I want to compile the code.

@DjebbZ DjebbZ closed this as completed Feb 11, 2019
@DjebbZ
Copy link
Author

DjebbZ commented Feb 11, 2019

Or would you be interested into this feature for hicada itself ? (Sorry to reopen).

@DjebbZ DjebbZ reopened this Feb 11, 2019
@rauhs
Copy link
Owner

rauhs commented Feb 21, 2019

Any non-breaking features are welcome :)

@DjebbZ
Copy link
Author

DjebbZ commented Feb 21, 2019

Ok, I've been given more thought about the question. Currently one has to use rum or something like this to do the actual rendering to HTML on the JVM. I first thought that wasn't the case, in the sense that hicada was standalone.

You seem open to the feature, but there's no test coverage to know whether I break something if I try to implement it. What would be a good strategy?

@DjebbZ
Copy link
Author

DjebbZ commented Feb 21, 2019

Rum happens to have a good strategy: it compares its own server side rendering with React.js itself on node and does isomorphic rendering to allow manual checking of the result in the browser. All with the same code.

Should hicada contains such a test suite? Something else?

@rauhs
Copy link
Owner

rauhs commented Mar 2, 2019

I don't think I'm interested in implementing (and maintaining) an HTML renderer. The rum one works great. I also think this is possible with the server-render? option, no?

@DjebbZ
Copy link
Author

DjebbZ commented Mar 3, 2019 via email

@niwinz
Copy link
Collaborator

niwinz commented May 13, 2021

I will close the issue but the server rendering will be considered probably in a near future.

@niwinz niwinz closed this as completed May 13, 2021
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

No branches or pull requests

3 participants