create-powerapps-project 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,15 +36,15 @@ function getPackages(type) {
36
36
  if (type === 'pcf') {
37
37
  return {
38
38
  dependencies: [
39
- 'react',
40
- 'react-dom',
39
+ 'react@17.0.2',
40
+ 'react-dom@17.0.2',
41
41
  '@fluentui/react',
42
42
  '@fluentui/font-icons-mdl2'
43
43
  ],
44
44
  devDependencies: [
45
45
  //`powerapps-project-${type}`,
46
- '@types/react',
47
- '@types/react-dom',
46
+ '@types/react@17.0.39',
47
+ '@types/react-dom@17.0.11',
48
48
  '@types/xrm',
49
49
  '-D'
50
50
  ]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-powerapps-project",
3
3
  "description": "💧 plop generator for Dataverse development",
4
- "version": "0.18.0",
4
+ "version": "0.19.0",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
7
7
  "main": "lib/index.js",
@@ -1,6 +1,6 @@
1
1
  import { IInputs, IOutputs } from "./generated/ManifestTypes";
2
2
  import React from 'react';
3
- import { createRoot, Root } from 'react-dom/client';
3
+ import ReactDOM from 'react-dom';
4
4
  import { initializeIcons } from '@fluentui/font-icons-mdl2';
5
5
 
6
6
  import { App, AppProps } from './App';
@@ -33,7 +33,6 @@ export class {{name}} implements ComponentFramework.StandardControl<IInputs, IOu
33
33
  this.container = container;
34
34
  this.context = context;
35
35
  this.isTestHarness = document.getElementById('control-dimensions') !== null;
36
- this.root = createRoot(this.container);
37
36
  }
38
37
 
39
38
 
@@ -46,8 +45,9 @@ export class {{name}} implements ComponentFramework.StandardControl<IInputs, IOu
46
45
  isTestHarness: this.isTestHarness
47
46
  };
48
47
 
49
- this.root.render(
50
- React.createElement(App, this.props)
48
+ ReactDOM.render(
49
+ React.createElement(App, this.props),
50
+ this.container
51
51
  );
52
52
  }
53
53
 
@@ -64,7 +64,7 @@ export class {{name}} implements ComponentFramework.StandardControl<IInputs, IOu
64
64
  * i.e. cancelling any pending remote calls, removing listeners, etc.
65
65
  */
66
66
  public destroy(): void {
67
- this.root.unmount();
67
+ ReactDOM.unmountComponentAtNode(this.container);
68
68
  }
69
69
 
70
70
  }