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

Server side rendering. #2

Open
DylanPiercey opened this issue Feb 22, 2016 · 1 comment
Open

Server side rendering. #2

DylanPiercey opened this issue Feb 22, 2016 · 1 comment
Labels

Comments

@DylanPiercey
Copy link

Randomly stumbled on this library - it looks awesome. One thing that seems missing is the ability to initially render on the server side.

Even internally using something like https://github.com/krisselden/simple-dom would help.

Ideally there would be a "monkberry-server" compiler that rendered a string instead of dom for isomorphic apps though.

// You could expose something similar to reacts renderString.
monkberry.renderString(...);

However I think the trickiest bit is "bootstrapping" existing dom so that you aren't destroying inputs and such when the js takes over.

If this was to be done I think a node-js "require hook" similar to babel and coffee-script would be handy as well to allow for isomorphic code when paired with monkberryify.

Something like:

require("monkberry/register");

Great work with this, although I haven't tested it out yet it looks very promising.

@antonmedv
Copy link
Owner

Hi,

I have plans to implement server rendering, via separation of compilers: DOM compiler and string compiler.
There well be different compiled javascripts for string compiler.
But now i don't know how to best integrate this in node.js.

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

No branches or pull requests

2 participants