Skip to content

Commit b074da5

Browse files
author
Amr Wagdy
committed
Improvement: Support React 18
1 parent c7f59e7 commit b074da5

File tree

6 files changed

+6972
-24
lines changed

6 files changed

+6972
-24
lines changed

.babelrc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,15 @@
33
[
44
"@babel/preset-env"
55
],
6-
["@babel/preset-react", {"runtime": "automatic"}]
6+
["@babel/preset-react", { "runtime": "automatic" }]
77
],
88
"plugins": [
99
"@babel/plugin-syntax-dynamic-import",
1010
"@babel/plugin-syntax-import-meta",
1111
"@babel/plugin-proposal-class-properties",
1212
"@babel/plugin-proposal-json-strings",
1313
[
14-
"@babel/plugin-proposal-decorators",
15-
{
16-
"legacy": true
17-
}
14+
"@babel/plugin-proposal-decorators",{ "legacy": true }
1815
],
1916
"@babel/plugin-proposal-function-sent",
2017
"@babel/plugin-proposal-export-namespace-from",

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Types of changes:
1414

1515
> Date format: YYYY-MM-DD
1616
17-
> If we have some "Breaking changes" we can mark it in message by `**BREAKING**` preffix, like:
17+
> If we have some "Breaking changes" we can mark it in message by `**BREAKING**` preffix, like:
1818
> `- **BREAKING**: Some message`
1919
2020
-------------
@@ -27,6 +27,13 @@ Types of changes:
2727
-------------
2828

2929
-------------
30+
## 3.6.3 - 2022-04-29
31+
### Changed
32+
- Support React 18
33+
34+
### Fixed
35+
- Removed deprecated methods
36+
3037
## 3.6.2 - 2022-04-29
3138
### Fixed
3239
- Low preview image width

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Release](https://img.shields.io/badge/release-v3.6.2-blue.svg)](https://github.com/scaleflex/js-cloudimage-responsive/releases)
1+
[![Release](https://img.shields.io/github/v/release/scaleflex/react-cloudimage-responsive)](https://github.com/scaleflex/js-cloudimage-responsive/releases)
22
[![Free plan](https://img.shields.io/badge/price-includes%20free%20plan-green.svg)](https://www.cloudimage.io/en/home#b38181a6-b9c8-4015-9742-7b1a1ad382d5)
33
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)](#contributing)
44
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)

examples/src/index.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { render } from 'react-dom';
1+
import ReactDOM from 'react-dom/client';
22
import { CloudimageProvider } from '../../src';
33
import './style.css';
44
import App from './components/app';
@@ -16,12 +16,10 @@ const cloudimageConfig = {
1616
},
1717
};
1818

19-
function Start() {
20-
return (
21-
<CloudimageProvider config={cloudimageConfig}>
22-
<App />
23-
</CloudimageProvider>
24-
);
25-
}
19+
const root = ReactDOM.createRoot(document.getElementById('app'));
2620

27-
render(<Start />, document.getElementById('app'));
21+
root.render(
22+
<CloudimageProvider config={cloudimageConfig}>
23+
<App />
24+
</CloudimageProvider>,
25+
);

package.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-cloudimage-responsive",
3-
"version": "3.6.2",
3+
"version": "3.6.3",
44
"main": "dist/index.js",
55
"description": "Cloudimage Responsive will smartly resize, compress and accelerate images across the World in your site for all devices. The plugin supports lazy loading technique with fancy animation on image load.",
66
"author": "scaleflex",
@@ -42,14 +42,9 @@
4242
"dependencies": {
4343
"cloudimage-responsive-utils": "^2.4.9",
4444
"core-js": "^3.15.2",
45-
"prop-types": "^15.8.1",
4645
"react-lazyload": "^3.2.0",
4746
"throttle-debounce": "^3.0.1"
4847
},
49-
"peerDependencies": {
50-
"react": "^17.0.2",
51-
"react-dom": "^17.0.2"
52-
},
5348
"devDependencies": {
5449
"@babel/cli": "^7.14.5",
5550
"@babel/core": "^7.14.6",
@@ -74,8 +69,8 @@
7469
"eslint-plugin-react-hooks": "^4.3.0",
7570
"gh-pages": "^2.0.1",
7671
"html-webpack-plugin": "^3.2.0",
77-
"react": "^17.0.2",
78-
"react-dom": "^17.0.2",
72+
"react": "^18.2.0",
73+
"react-dom": "^18.2.0",
7974
"react-syntax-highlighter": "^10.2.0",
8075
"style-loader": "^0.23.1",
8176
"webpack": "^4.46.0",

0 commit comments

Comments
 (0)