You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I am using sprotty in an react app. I just want to let you know, that the typescript compiler gives me some compilation errors like Type 'Element' is missing the following properties from type 'VNode': sel, data, children, elm, text. What I understand is that the compiler expects the render method to return Element from react, but gets VNode from snabbdom. I guess the problem is the same as described here: theia-ide/sprotty#203
In that original issue, a solution has been proposed to use jsx pragma and set the types property in tsconfig to empty array (by the way, the links to the msdn blog in the original issue are broken).
Setting types to empty array did not do the trick for me. I am using ts-ignore which is quite unsatisfying. You can see it here: https://github.com/crossecore/ecore-editor/blob/master/src/views.tsx#L26
The text was updated successfully, but these errors were encountered:
Yes, using Sprotty and React in the same project is a problem. One solution is to use separate tsconfig.json files (or even separate packages) for the Sprotty related code and the React related code. Another solution is to avoid tsx for Sprotty and use the Snabbdom API directly instead.
All suggested solutions have their downsides. I think this is a general problem that should be addressed by the typescript compiler properly. So this can be closed.
Hi.
I am using sprotty in an react app. I just want to let you know, that the typescript compiler gives me some compilation errors like
Type 'Element' is missing the following properties from type 'VNode': sel, data, children, elm, text
. What I understand is that the compiler expects the render method to return Element from react, but gets VNode from snabbdom. I guess the problem is the same as described here: theia-ide/sprotty#203In that original issue, a solution has been proposed to use jsx pragma and set the types property in tsconfig to empty array (by the way, the links to the msdn blog in the original issue are broken).
Setting types to empty array did not do the trick for me. I am using ts-ignore which is quite unsatisfying. You can see it here: https://github.com/crossecore/ecore-editor/blob/master/src/views.tsx#L26
The text was updated successfully, but these errors were encountered: