This is a migrated thread and some comments may be shown as answers.

ASP .NET Core React Grid

1 Answer 91 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 26 Aug 2018, 02:50 PM

I built a default ASP .NET Core Web Application with React support enabled.

This built and ran.

I then used the example from the Kendo React Grid - https://www.telerik.com/kendo-react-ui/components/grid/

to add a Grid to the example code, replacing a table.

If I run the sample in IE 11 I get an exception in the following function :

export function registerForLocalization(component) {
    var ctx = {
        kendoLocalizationService: PropTypes.object
    };
    if (component.contextTypes) {
        Object.assign(component.contextTypes, ctx);   <<<<<<<<<<<<<<<<<<<< unsupported in IE
    }
    else {
        component.contextTypes = ctx;
    }

 

This seems to be because the Object.assign function is not supported in IE.

If I run in Edge or Chrome, the page loads, then it quickly fills the page with Error messages such as :

ERROR in [at-loader] ..\..\..\node_modules\@types\prop-types\index.d.ts:10:38 TS1005: '=' expected.
ERROR in [at-loader] ..\..\..\node_modules\@types\prop-types\index.d.ts:12:46 TS1005: ';' expected.
ERROR in [at-loader] ..\..\..\node_modules\@types\prop-types\index.d.ts:12:75 TS1005: ';' expected.
ERROR in [at-loader] ..\..\..\node_modules\@types\prop-types\index.d.ts:12:99 TS1005: ';' expected.
ERROR in [at-loader] ..\..\..\node_modules\@types\prop-types\index.d.ts:14:54 TS1005: ';' expected.
ERROR in [at-loader] ..\..\..\node_modules\@types\prop-types\index.d.ts:14:78 TS1005: ';' expected.
ERROR in [at-loader] ..\..\..\node_modules\@types\prop-types\index.d.ts:14:81 TS1109: Expression expected.
ERROR in [at-loader] ..\..\..\node_modules\@types\prop-types\index.d.ts:14:97 TS1109: Expression expected.
ERROR in [at-loader] ..\..\..\node_modules\@types\prop-types\index.d.ts:14:122

Any ideas how to resolve either of these issues ?

Is there a working example of using the controls with ASP .NET Code Web in React ?

Thanks,

Dave

 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 28 Aug 2018, 07:00 AM
Hello, David,

Thank you for the details.

Issues like this are usually caused by missing polyfills which are required by React as well:

https://reactjs.org/docs/javascript-environment-requirements.html

Also, please ensure that the version of React and ReactDOM is 16+ as previously the ASP.NET Core templates with React have used version 15+.

If the issue still occurs, please share the example with us and we will gladly assist.

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or