Integrating React into UWP, without using react-native

0

I need to create a Universal Windows Application using compiled code that compiles to JS from ReasonML/BuckleScript.

The error is that "react" doesn't support createElement, which I know it does. Which means that the react library is not being included.

I placed the require(' ') inside of [ ] because of the error stating to do so.

0x800a139e - JavaScript runtime error: Module name "react" has not been loaded yet for context: _. Use require([])


var React = require(["react"]);
var App$Kraken = require(["./Components/App/App.bs.js"]);
var ReactDOMRe = require(["reason-react/lib/js/src/ReactDOMRe.js"]);
var GlobalStyles$Kraken = require(["./Styles/GlobalStyles.bs.js"]);

function runApp(param) {
  return ReactDOMRe.renderToElementWithId(React.createElement(App$Kraken.make, {}), "app");
}

0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'createElement' occurred
reactjs
uwp
visual-studio-2017
reason
asked on Stack Overflow May 28, 2019 by M Sharp • edited May 28, 2019 by M Sharp

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0