Skip to content

Commit

Permalink
chore(usertask): bump react version to 18.2.0
Browse files Browse the repository at this point in the history
* - migrate react render to createRoot+render
- update maven-war-plugin for jdk17
- get rid of another react warning with null value in input

Related to CAM-14548

Co-authored-by: Daniel Kelemen <daniel.kelemen@camunda.com>
  • Loading branch information
yanavasileva and danielkelemen committed Oct 14, 2022
1 parent 54c74e5 commit 20a4d7c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
4 changes: 2 additions & 2 deletions usertask/task-form-embedded-react/config/react/loadReact.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

const react = document.createElement('script');
react.crossOrigin = true;
react.src = 'https://unpkg.com/react@17.0.2/umd/react.development.js'
react.src = 'https://unpkg.com/react@18.2.0/umd/react.development.js'

const reactDom = document.createElement('script');
reactDom.crossOrigin = true;
reactDom.src = 'https://unpkg.com/react-dom@17.0.2/umd/react-dom.development.js'
reactDom.src = 'https://unpkg.com/react-dom@18.2.0/umd/react-dom.development.js'

document.body.append(react);
document.body.append(reactDom);
12 changes: 12 additions & 0 deletions usertask/task-form-embedded-react/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@

</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>

<repositories>
<repository>
<id>camunda-bpm-nexus</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
}
}

ReactDOM.render(e(StartForm), container);
const root = ReactDOM.createRoot(container);
root.render(e(StartForm));
</script>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
e('div', {className: 'col-md-6', key:'container'},
e('input', {
className: 'form-control',
value: this.props.value,
value: this.props.value || '',
readOnly: true
}))
]);
Expand Down Expand Up @@ -111,9 +111,8 @@
}
}

ReactDOM.render(e(Approval,
camForm.variableManager.variables ),
container);
const root = ReactDOM.createRoot(container);
root.render(e(Approval, camForm.variableManager.variables));
}
</script>
</form>

0 comments on commit 20a4d7c

Please sign in to comment.