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

.toString()? #5

Closed
yoshuawuyts opened this issue May 11, 2015 · 2 comments
Closed

.toString()? #5

yoshuawuyts opened this issue May 11, 2015 · 2 comments

Comments

@yoshuawuyts
Copy link
Contributor

When rendering on the server it can be neat to implement a .toString() function (or equivalent) to render components to html. I'm not sure what the tradeoffs are; but I think it's feasible to implement for every component. Thanks!

See Also

@yoshuawuyts
Copy link
Contributor Author

Guess this would be shorthand for https://github.com/shama/base-element/blob/master/examples/server-side.js#L24-L31. Thinking the interface would look something like:

const str = el.toString(['This is', 'the initial', 'content'])

@shama
Copy link
Owner

shama commented May 11, 2015

+1 That's a good idea. Because then we could perform a render first too in case element hasn't been created.

yoshuawuyts added a commit to yoshuawuyts/base-element that referenced this issue May 13, 2015
@shama shama closed this as completed in 0959d23 May 14, 2015
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 a pull request may close this issue.

2 participants