diff --git a/fixtures/attribute-behavior/src/index.js b/fixtures/attribute-behavior/src/index.js
index 7fa0938e3278a..cc0be8ae0ed6c 100644
--- a/fixtures/attribute-behavior/src/index.js
+++ b/fixtures/attribute-behavior/src/index.js
@@ -1,6 +1,9 @@
-import './index.css';
import React from 'react';
-import ReactDOM from 'react-dom';
+import { createRoot } from 'react-dom/client';
import App from './App';
-ReactDOM.render(, document.getElementById('root'));
+const container = document.getElementById('root');
+if (container) {
+ const root = createRoot(container);
+ root.render();
+}