Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Render Middleware #5

Closed
thomashuston opened this issue Mar 26, 2017 · 1 comment
Closed

Render Middleware #5

thomashuston opened this issue Mar 26, 2017 · 1 comment

Comments

@thomashuston
Copy link
Contributor

Right now, I've only baked in support for very straightforward ReactDOM renderToStaticMarkup in the react-percy-server-render package. It will automatically inject any CSS files into the head, but that's about it.

We may want to expose a way to modify the generated HTML before sending it to Percy, though. For example, when using styled-components for styling, ReactDOM will render in references to class names, but the CSS styles themselves need to be flushed and injected into the head. Middleware might be a nice way to make this possible without cluttering up the core react-percy code too much with edge cases.

@thomashuston
Copy link
Contributor Author

This issue is no longer relevant now that we client side render snapshots. Libraries like styled components should work just fine out of the box now.

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

No branches or pull requests

1 participant