Skip to content

Commit

Permalink
fix: update react to 18 and react-tabs to 6 (#2547)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVarchuk committed Jun 6, 2024
1 parent 72dd57d commit c664dd0
Show file tree
Hide file tree
Showing 16 changed files with 1,986 additions and 1,105 deletions.
6 changes: 4 additions & 2 deletions demo/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { render } from 'react-dom';
import { createRoot } from 'react-dom/client';
import styled from 'styled-components';
import { RedocStandalone } from '../src';
import ComboBox from './ComboBox';
Expand Down Expand Up @@ -179,7 +179,9 @@ const Logo = styled.img`
}
`;

render(<DemoApp />, document.getElementById('container'));
const container = document.getElementById('container');
const root = createRoot(container!);
root.render(<DemoApp />);

/* ====== Helpers ====== */
function updateQueryStringParameter(uri, key, value) {
Expand Down
8 changes: 5 additions & 3 deletions demo/playground/hmr-playground.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { render } from 'react-dom';
import { createRoot } from 'react-dom/client';
import type { RedocRawOptions } from '../../src/services/RedocNormalizedOptions';
import RedocStandalone from './hot';
import { RedocStandalone } from '../../src';

const big = window.location.search.indexOf('big') > -1;
const swagger = window.location.search.indexOf('swagger') > -1;
Expand All @@ -13,4 +13,6 @@ const specUrl =

const options: RedocRawOptions = { nativeScrollbars: false, maxDisplayedEnumValues: 3 };

render(<RedocStandalone specUrl={specUrl} options={options} />, document.getElementById('example'));
const container = document.getElementById('example');
const root = createRoot(container!);
root.render(<RedocStandalone specUrl={specUrl} options={options} />);
10 changes: 0 additions & 10 deletions demo/playground/hot.tsx

This file was deleted.

8 changes: 1 addition & 7 deletions demo/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function root(filename) {
return resolve(__dirname + '/' + filename);
}

export default (env: { playground?: boolean; bench?: boolean } = {}, { mode }) => ({
export default (env: { playground?: boolean; bench?: boolean } = {}) => ({
entry: [
root('../src/polyfills.ts'),
root(
Expand Down Expand Up @@ -51,12 +51,6 @@ export default (env: { playground?: boolean; bench?: boolean } = {}, { mode }) =
fs: false,
os: false,
},
alias:
mode !== 'production'
? {
'react-dom': '@hot-loader/react-dom',
}
: {},
},

performance: false,
Expand Down
Loading

0 comments on commit c664dd0

Please sign in to comment.