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

Change the render approach so that it does not need ReactDomServer #32

Closed
wants to merge 1 commit into from

Conversation

CurtisHumphrey
Copy link

ReactDomServer is not typically included on a website and so it usage increase bloat. This approach does the same thing and uses dependence present namely ReactDom.

It does output style slightly differently so I had to also update the fixtures (added a space and a ";")

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 3acf5da on CurtisHumphrey:master into 2be11a1 on atomic-app:master.

@tanem
Copy link
Owner

tanem commented Nov 2, 2017

Hi @CurtisHumphrey, thanks for you PR. I have some questions:

it usage increase bloat

Do you have some numbers to back this up?

Also, please see inline comment(s) for other questions/comments.

At this point though I'm not keen on rewriting the module internals and potentially compromising stability, unless there is a proven issue that needs addressing.

<div className={className} data-src={path} style={style} />
</div>
const wrapper = document.createElement('div');
ReactDOM.render(
Copy link
Owner

@tanem tanem Nov 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will render without the extra wrapping div, so will likely cause bugs. See #16, #24 and #30 (actually just noticed that you raised #30 too 😉). At some point I'll write some tests around this specifically, since it seems to keep coming up in discussions.

evalScripts,
each,
});
this.container.appendChild(wrapper.firstChild);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why the order of this has been flipped compared to the original version? I vaguely remember the original order was deliberate too but I'll have to check the issues again to be sure.

@tanem
Copy link
Owner

tanem commented Nov 27, 2017

Closing due to no activity...

@tanem tanem closed this Nov 27, 2017
@matthewoates
Copy link

@CurtisHumphrey

I saw this too and thought it might've been a massive issue, but including it in my project adds only ~13 KB pre-gzip which I think is somewhat reasonable. This is probably due to dead code removal.

@tanem
Copy link
Owner

tanem commented Sep 13, 2018

Thanks for adding that info @matthewoates 👍

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 this pull request may close these issues.

4 participants