question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Layout feature proposal

See original GitHub issue

(full disclosure, I’m writing this fork atm, would love to be able to issue a PR later to add it into the main stream)

My use case: I want the entire document tree (HTML, Head, etc) rendered by React on the server (controlled by a Store, etc) but this is problematic on the Client if you want to have the ability to embed third party scripts, analytics, etc. So you need to have the client render the core of your app somewhere in the Body.

If you render into a component other than HTML (when you’re controlling the whole document on the server) then checksums will fail (assuming renderToStaticMarkup) because the reactroot is different when you render on the client - and if you don’t use checksums then you’re blitzing the node content which defeats some of the performance gains from having an Isomorphic app.

IDEALLY I’d have the ability to have a wrapper for whatever view I pass. This wrapper would always be use rendertoString and the wrapped component would use whatever was set in options (in my case renderToStaticMarkup). This is probably best handled in the options as a config.

Handling it in the options allows overriding it in the reply interface as well - which is very helpful.

an example:

reply.view("myAppComponent", componentPropsObj, {wrapper: myHTMLComponent, wrapperProps: wrapperPropsObj})

Thoughts on if this would be a desired optional feature? It certainly is extremely useful for fully controlled apps.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
abritinthebaycommented, May 6, 2016

I’ll slap a PR together either way, but thought I should detail the changes.

0reactions
jedirezacommented, May 17, 2016

Resolved in #55

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Write a Great Feature Proposal | by Fiona Podrimaj
1. Title. The title of the proposal should be descriptive and concise. · 2. Context. Every proposal should have a description that summarises ......
Read more >
29 Sample Proposal Templates and Design Tips - Visme
Looking to create a proposal to start selling your products or services? ... they can be a feature of the proposal, highlighting text...
Read more >
My favorite feature proposal template - Daniel Bachhuber
My favorite feature proposal template ... How many design, development, and project management hours will this project require?
Read more >
5 Layout Tips for Proposal Graphics
Graphics are key to effective proposals. Follow these layout tips to achieve a well-designed proposal that is easy to read, evaluate, ...
Read more >
How to create a winning design proposal with user research
Learn how to write a design proposal document that protects you from a client's goals or expectations of a design.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found