Closed crcdng closed 7 years ago
error in the instruction
06 React Helmet
In the instruction to edit src/server/render-app.jsx,
src/server/render-app.jsx
import Helmet from 'react-helmet' // [...] const renderApp = (/* [...] */) => { const appHtml = ReactDOMServer.renderToString(/* [...] */) const head = Helmet.rewind() return ( `<!doctype html> <html> <head> ${head.title} ${head.meta} <link rel="stylesheet" href="${STATIC_PATH}/css/style.css"> </head> [...] ` ) }
the line const store = initStore(plainPartialState) is missing before the line const appHtml = ReactDOMServer.renderToString(/* [...] */).
const store = initStore(plainPartialState)
const appHtml = ReactDOMServer.renderToString(/* [...] */)
You're right, the code is missing a [...]. That's confusing.
[...]
Fixed.
Type of issue: (feature suggestion, bug?)
error in the instruction
Chapter:
06 React Helmet
If it's a bug:
In the instruction to edit
src/server/render-app.jsx
,the line
const store = initStore(plainPartialState)
is missing before the lineconst appHtml = ReactDOMServer.renderToString(/* [...] */)
.