-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update to react@18 and @cfaester/enzyme-adapter-react-18
- Loading branch information
1 parent
d57525a
commit d0eede5
Showing
5 changed files
with
45 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
/* eslint-disable no-console */ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import { createRoot } from 'react-dom/client' | ||
// @ts-expect-error - untyped output file | ||
import JsxParser from '../dist/umd/react-jsx-parser.min' | ||
|
||
ReactDOM.render( | ||
const root = createRoot(document.querySelector('#root')!) | ||
|
||
root.render( | ||
<JsxParser | ||
autoCloseVoidElements | ||
jsx={` | ||
<img src="http://placekitten.com/300/500"> | ||
<img src="https://picsum.photos/300/500"> | ||
<div className="foo">bar</div> | ||
`} | ||
onError={console.error} | ||
showWarnings | ||
/>, | ||
document.querySelector('#root'), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
import Enzyme from 'enzyme' | ||
import Adapter from 'enzyme-adapter-react-16' | ||
import Adapter from '@cfaester/enzyme-adapter-react-18' | ||
/* eslint-enable import/no-extraneous-dependencies */ | ||
|
||
Enzyme.configure({ adapter: new Adapter() }) |