-
Notifications
You must be signed in to change notification settings - Fork 922
Closed
Description
I looked through all similar issues in this repo, but my case is really strange. I reduce my code as much as possible but this error is still there
My current bundle file (I use webpack)
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import ReactDOMServer from 'react-dom/server';
global.React = React;
global.ReactDOM = ReactDOM;
global.ReactDOMServer = ReactDOMServer;
global.__SERVER__ = true;
require('expose?Post!./post');
require('expose?React!react');
require('expose?ReactDOM!react-dom');
and here is my simple component
class Post extends Component {
render() {
return <div>Post title</div>;
}
}
module.exports = Post;
and finally in .cshtml
file
<div id="appRoot">
@Html.React("Post", new
{
Title = @Model.Title
})
</div>
@Html.ReactInitJavaScript();
that's all. But I still get those error. What can cause it? When I remove @Html.React error stop appears
Metadata
Metadata
Assignees
Labels
No labels