Merge pull request #7210 from tchak/fix-strict-mode
fix(react): too soon for strict mode
This commit is contained in:
commit
cb6dd3dce9
1 changed files with 2 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
import { Controller } from '@hotwired/stimulus';
|
||||
import React, { lazy, Suspense, FunctionComponent, StrictMode } from 'react';
|
||||
import React, { lazy, Suspense, FunctionComponent } from 'react';
|
||||
import { render, unmountComponentAtNode } from 'react-dom';
|
||||
import invariant from 'tiny-invariant';
|
||||
|
||||
|
@ -44,12 +44,7 @@ export class ReactController extends Controller {
|
|||
Component,
|
||||
`Cannot find a React component with class "${componentName}"`
|
||||
);
|
||||
render(
|
||||
<StrictMode>
|
||||
<Component {...props} />
|
||||
</StrictMode>,
|
||||
node
|
||||
);
|
||||
render(<Component {...props} />, node);
|
||||
}
|
||||
|
||||
private getComponent(componentName: string): FunctionComponent<Props> | null {
|
||||
|
|
Loading…
Reference in a new issue