From 67ba8acff70131712f7cc0a09830d619babd5387 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Thu, 28 Apr 2022 14:45:35 +0200 Subject: [PATCH] fix(react): too soon for strict mode --- app/javascript/controllers/react_controller.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/javascript/controllers/react_controller.tsx b/app/javascript/controllers/react_controller.tsx index 0e30b8a08..22458ace7 100644 --- a/app/javascript/controllers/react_controller.tsx +++ b/app/javascript/controllers/react_controller.tsx @@ -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( - - - , - node - ); + render(, node); } private getComponent(componentName: string): FunctionComponent | null {