-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add support for directly use other react component #191
Comments
Hi @dum3ng, this has been asked a couple of times before. I'm not keen on extending the Sablono/Hiccup language with something like this at the moment, since it adds a lot more complexity. My main concern with something like this is server side rendering. For now, I would suggest to wrap this in a function if you use this a lot. We can revisit this later. |
Just discussed this over at the Rum issue tracker :) Would be really nice to be able to refer to a React component class in place of a symbol. Something like Currently, you have to do something like this:
Which is a whole lot more cumbersome. I can try to write up a PR if you would consider something like that! |
Hi @augustl , I didn't add this yet, because of server side rendering. How would that work? The only solution I had in mind so far is emitting a blank div or something like that. Give it a try, but please keep the server side rendering in mind. Server side rendering is done via om.next at the moment, but since not much is happening with om.next I thought about borrowing that code and remove that dependency (which causes some problems already). r0man |
In
reagent
, we can just directly use react component bywhile sablono seems not support this.
Now I need to write wrapper functions which made the syntax not looked so concise compared with just using vector.
How about it?
The text was updated successfully, but these errors were encountered: