Flipboard / Flipboard/react-canvas
When using a canvas component, mountedImages[i] is undefined
- Dominant language
- JavaScript
- Stars
- 13.2k
- Forks
- 909
- PR merge metrics
- No merged PRs in 30d
Description
Use case like so:
``` js
import { Button } from 'reapp-kit';
import { Surface, Text } from 'react-canvas';
export default class extends React.Component {
render() {
return (
Here is some text
hello world
);
}
};
const styles = {
width: window.innerWidth,
height: window.innerHeight,
text: {
top: 20,
left: 20,
width: window.innerWidth,
height: 20,
lineHeight: 20,
fontSize: 12
}
}
```
Button is just a simple surface, but its defined in an different module. That module does a require('react-canvas') as well though.
Error is on this line:
https://github.com/Flipboard/react-canvas/blob/3ac33e05ff9364a570613e3d57d1877563163a23/lib/ContainerMixin.js#L121
When inspecting that error, mountedImages looks like:
``` js
[RenderLayer, ""]
```
Seems like the problem is that it's expecting a RenderLayer but it's getting a string (the canvas string above).
Any ideas?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.