Skip to content

Commit 5c557e3

Browse files
app.tsx reduce code
1 parent 76030ef commit 5c557e3

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

apps/remote3/src/app/app.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@ import r2wc from '@r2wc/react-to-web-component';
66
export function App() {
77
return (
88
<div>
9-
<NxWelcome title="remote3" />
9+
<NxWelcome title="remote3"/>
1010
</div>
1111
);
1212
}
1313

1414
export function defineReactWebComponent() {
1515
// Define the new custom element with the element name for the React Web Component.
1616
if (!customElements.get('wc-remote3')) {
17-
if (!customElements.get('wc-remote3')) {
18-
// This is where we convert the React component to a Web Component
19-
customElements.define('wc-remote3', r2wc(App));
20-
}
17+
// This is where we convert the React component to a Web Component
18+
customElements.define('wc-remote3', r2wc(App));
2119
}
2220
}
2321

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)