Skip to content

Commit ee0a752

Browse files
committed
Merge branch 'master' of github.com:cellog/revealjs-react
2 parents b069fec + 3b91fcb commit ee0a752

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+129
-4343
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
node_modules
2-
test/bundle.js
2+
test/bundle.js
3+
dist/
4+
index.esm.js
5+
index.esm.js.map
6+
index.js
7+
index.js.map

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -552,15 +552,14 @@ is a full major version out of date.
552552
import { useReveal } from "@gregcello/revealjs-react";
553553

554554
export function MyComponent() {
555-
const { reveal, readyPromise } = useReveal();
555+
const { reveal } = useReveal();
556556
useEffect(() => {
557-
if (!reveal || !readyPromise) {
557+
if (!reveal) {
558558
return;
559559
}
560-
readyPromise.then(() => {
561-
// interact with reveal API
562-
reveal.on('slidechanged', () => { /* do something */ });
563-
})
560+
// interact with reveal API - reveal is only set
561+
// when it is initialized and the API is ready to use
562+
reveal.on('slidechanged', () => { /* do something */ });
564563
}, [reveal]);
565564
}
566565
```
@@ -574,7 +573,8 @@ export function MyPresentation() {
574573
const { reveal, readyPromise } = useReveal();
575574
// don't do this!
576575
return (
577-
<RevealJs>...
576+
<RevealJs>
577+
{ /* ... slides go here */ }
578578
</RevealJs>
579579
)
580580
```

dist/components/BaseComponent.d.ts

Lines changed: 0 additions & 56 deletions
This file was deleted.

dist/components/BaseComponent.js

Lines changed: 0 additions & 37 deletions
This file was deleted.

dist/components/RevealJS.d.ts

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)