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

StaticReactRenderer is not constructed correctly if limenius_react.react_renderer service is not defined #36

Closed
rakelley opened this issue Dec 18, 2018 · 2 comments

Comments

@rakelley
Copy link

#33 broke compatibility with default_rendering: "client_side" configuration, as \Limenius\ReactRenderer\Twig\ReactRenderExtension::__construct() blindly calls \Limenius\ReactRenderer\Renderer\StaticReactRenderer::setRenderer() without checking if the renderer is null.

Everything works with server_side or both, or if you have a custom service defined for limenius_react.react_renderer, but by default there is no guarantee of such a service existing.

@rakelley
Copy link
Author

This should actually be on ReactRenderer, sorry

@WictorT
Copy link

WictorT commented May 13, 2019

A quick solution to make client_side work on Symfony4 is.

In services.yaml add under services :

    limenius_react.react_renderer:
        class: Limenius\ReactRenderer\Renderer\StaticReactRenderer

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

No branches or pull requests

2 participants