creece
11/05/2018, 5:37 PMjkabot
11/05/2018, 5:49 PM<div id="react-root" />
Then run in a client script call
require(['react', 'react-dom'], function(React, ReactDOM) {
ReactDOM.render(
React.createElement(your element, { your props }),
document.getElementById('react-root')
);
});
I have the paths to react and react-dom set up in an @NAmdConfig filecreece
11/05/2018, 5:54 PMcreece
11/05/2018, 5:54 PMcreece
11/05/2018, 5:55 PMjkabot
11/05/2018, 5:56 PM<style> followed by <div id="react-root"></div>
A pageInit function on the client script attached to the suitelet then requires the other scripts and initializes the react appcreece
11/05/2018, 5:57 PMjkabot
11/05/2018, 6:01 PMreact and react-dom
As far as I understand, everything works ok as long as you use one require function to bring in your client side dependencies, since NetSuite does not run server-side static analysis on client scripts you requirejkabot
11/05/2018, 6:02 PMcreece
11/05/2018, 6:02 PMjkabot
11/05/2018, 6:03 PMcreece
11/05/2018, 6:03 PMjkabot
11/05/2018, 6:03 PMcreece
11/05/2018, 6:03 PMcreece
11/05/2018, 6:03 PMjkabot
11/05/2018, 6:13 PMcreece
11/05/2018, 6:19 PMjkabot
11/05/2018, 6:20 PMcreece
11/05/2018, 6:21 PMcreece
11/05/2018, 6:22 PMcreece
11/05/2018, 6:22 PMstalbert
11/05/2018, 6:33 PMcreece
11/05/2018, 6:34 PMcreece
11/05/2018, 6:34 PMKevin
11/05/2018, 6:39 PMcreece
11/05/2018, 6:40 PMcreece
11/05/2018, 6:41 PMcreece
11/05/2018, 6:43 PMstalbert
11/05/2018, 7:10 PMcreece
11/05/2018, 7:34 PMcreece
11/05/2018, 7:34 PMalien4u
11/05/2018, 8:01 PMcreece
11/05/2018, 9:06 PMmichoel
11/05/2018, 9:56 PMcreece
11/05/2018, 10:02 PMcreece
11/05/2018, 10:02 PMstalbert
11/05/2018, 10:05 PMmichoel
11/05/2018, 10:13 PMmichoel
11/05/2018, 10:14 PMKevin
11/05/2018, 10:16 PMcreece
11/05/2018, 10:19 PMcreece
11/05/2018, 10:19 PMmichoel
11/05/2018, 10:22 PMcreece
11/05/2018, 10:27 PMjkabot
11/06/2018, 3:15 PM