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

why the response like this? #35

Closed
DarkPage opened this issue May 4, 2017 · 1 comment
Closed

why the response like this? #35

DarkPage opened this issue May 4, 2017 · 1 comment

Comments

@DarkPage
Copy link

DarkPage commented May 4, 2017

I use koa2 and koa-ejs to make a react ssr demo
koa code:

const markup = renderToString(
    <Provider store={store()} >
        <RouterContext { ...props } />
    </Provider>
);
await ctx.render('index', { markup });

chrome devtool look like this:

<html>
<head>
    <title>koa2 webpack2 react ssr</title>
</head>
<body>
    <div id="root">&lt;div data-reactroot=&#34;&#34; data-reactid=&#34;1&#34; data-react-checksum=&#34;-1292022691&#34;&gt;&lt;h4 data-reactid=&#34;2&#34;&gt;This is React App Component&lt;/h4&gt;&lt;a href=&#34;/a&#34; data-reactid=&#34;3&#34;&gt;A&lt;/a&gt;&lt;a href=&#34;/b&#34; data-reactid=&#34;4&#34;&gt;B&lt;/a&gt;&lt;a href=&#34;/c&#34; data-reactid=&#34;5&#34;&gt;C&lt;/a&gt;&lt;div data-reactid=&#34;6&#34;&gt;This is B&lt;/div&gt;&lt;/div&gt;</div>
    <script src="./bundle.js"></script>
</body>
</html>

why?

@DarkPage
Copy link
Author

DarkPage commented May 4, 2017

It's my mistake, i change my template <%= obj &> to <%- obj &> T_T

@DarkPage DarkPage closed this as completed May 4, 2017
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

1 participant