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

Not working in ReactDomServer #219

Open
kapdom opened this issue Oct 15, 2020 · 3 comments
Open

Not working in ReactDomServer #219

kapdom opened this issue Oct 15, 2020 · 3 comments

Comments

@kapdom
Copy link

kapdom commented Oct 15, 2020

Hi. I'm trying to generate avatar in "ReactDOMServer.renderToStaticNodeStream" but it's not working. In output everything looks correct apart content in span tag. It's empty. It doesn't matter if I'm trying to generate avatar as a picture or initials, always output is incorrect.


<div class="attorney-avatar-nav-bar sb-avatar" style="display: inline-block; vertical-align: middle; width: 16px; height: 16px; border-radius: 100%; font-family: Helvetica, Arial, sans-serif;">
    <div class="attorney-avatar-nav-bar sb-avatar__text" style="width: 16px; height: 16px; line-height: initial; text-align: center; color: #fff; border-radius: 100%;" title="Mitchell Griffith">
        <div style="display: table; table-layout: fixed; width: 100%; height: 100%;">
            <span style="display: table-cell; vertical-align: middle; font-size: 100%; white-space: nowrap;">
            	<span></span>
            </span>
        </div>
    </div>
</div>

What is wrong?
Thank you.

@franky47
Copy link

I have the same issue with ReactDOMServer.renderToString.

@JorgenEvens
Copy link
Member

Hi @kapdom, @franky47,

This is currently expected behavior as the component fetches the data on the page itself. There currently is no support for any sort of server-side rendering.

@shinxi
Copy link

shinxi commented Aug 27, 2022

Hello @JorgenEvens, this seems a regression, as it works fine at 2.5.1. We tried to upgrade react-avatar to 3.10 to work with React 17, however, it's stopped working.
Using ReactDOMServer.renderToString may help at some integration cases, e.g., for our case, we're using react-avatar at ExtJS templates.

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

No branches or pull requests

4 participants