FormidableLabs / FormidableLabs/spectacle

template() should be rendered on every slide in ?exportMode=true

Open
#897 1 comment 0 reactions 0 assignees View on GitHub
✓ Verified 🐛 Bug
Dominant language
TypeScript
Stars
10.2k
Forks
700
PR merge metrics
No merged PRs in 30d

Description

### Describe Your Environment

What version of Spectacle are you using? (can be found by running `npm list spectacle`)

```
spectacle@6.0.2
```

What version of React are you using? (can be found by running `npm list react`)

```
react@16.13.1
```

What browser are you using?

```
chrome (newest version)
```

What machine are you on?

```
macOS / macbook pro
```

### Describe the Problem

When `template` is used like

```jsx
const template = () => (








);

const App = () => (

```

The problem is not visible in examples because `` has always the same shape and doesn't render as a glitch, but when you use something more dynamic like page numbers:

```jsx
const template = ({ slideNumber, numberOfSlides }) => (





{slideNumber + 1} / {numberOfSlides}


);
```

Then in `?exportMode=true` it will render that template as many times as slides, all of them on the 1st page.

Zrzut ekranu 2020-05-4 o 22 29 12

- https://codesandbox.io/s/simple-spectacle-example-vg5ug
- https://vg5ug.csb.app/?exportMode=true

**Expected behavior:** [What you expect to happen]
template() should be rendered on every slide in ?exportMode=true

**Actual behavior:** [What actually happens]

template() is rendered as many times as number of slides on the "1st page" in `?exportMode`.

### Additional Information

N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.