Skip to content

Commit 7ddcfcf

Browse files
authored
Update README.md
1 parent 5a98c8c commit 7ddcfcf

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

README.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,27 @@ Add `Calendar` to your component:
2828

2929
```js
3030
import React from 'react'
31-
import ReactDOM from 'react-dom/client'
3231
import Calendar from 'reactjs-availability-calendar'
3332

34-
const bookings = [
35-
{
36-
from: '01-08-2022',
37-
to: '01-16-2022',
38-
middayCheckout: true,
39-
},
40-
{
41-
from: '06-25-2022',
42-
to: '07-03-2022',
43-
middayCheckout: false,
44-
},
45-
]
46-
47-
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
48-
root.render(
49-
<React.StrictMode>
50-
<div className='demo'>
51-
<Calendar bookings={bookings} />
52-
</div>
53-
</React.StrictMode>,
54-
)
33+
export default function App() {
34+
const bookings = [
35+
{
36+
from: '01-08-2022',
37+
to: '01-16-2022',
38+
middayCheckout: true,
39+
},
40+
{
41+
from: '06-25-2022',
42+
to: '07-03-2022',
43+
middayCheckout: false,
44+
},
45+
]
46+
47+
return (
48+
<Calendar bookings={bookings} />
49+
)
50+
}
51+
5552

5653
```
5754

0 commit comments

Comments
 (0)