V
V
varenik1632017-02-10 11:30:12
WordPress
varenik163, 2017-02-10 11:30:12

Why does the browser not see connected react modules?

When executing the Webpack build script, chrome throws Uncaught ReferenceError: Content is not defined. Maybe some additional script is needed to be interpreted by the browser? Here are the lines from the assembly file. Here is an error:

ReactDOM.render(React.createElement(Content, { content_text: document.getElementById('content').value }), content_area_wrap);

Although here webpack pulled up:
var Content = React.createClass({
    displayName: 'Content',

The build runs without errors. Script in wp plugin
wp_enqueue_script('key_build', plugins_url( 'js/dist/build.js', __FILE__ ), false, REACT_FSEO_KEYS_LIGHTER_CURRENT_VERSION);

Maybe he does not see the variable, because it is inside an anonymous closure?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question