i6mi6 / react-native-parallax-scroll-view

A ScrollView-like component with parallax and sticky header support.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module parse failed: Unexpected token (14:26)

expertup opened this issue · comments

My code:

import React from 'react';
import ReactDOM from 'react-dom';
import ParallaxScrollView from 'react-native-parallax-scroll-view';

class ParallaxComponent extends React.Component {
render() {
return (
<div fluid style={{ marginTop: '61px', overflow: 'hidden', boxSizing: 'context-box' }}>


)
}
}

class ParallaxImage extends React.Component {
render() {
return (
<ParallaxScrollView
backgroundColor="blue"
contentBackgroundColor="pink"
parallaxHeaderHeight={300}
renderForeground={() => (
<video autoPlay loop id="video-background" muted plays-inline style={{width:"100%",height:"100%"}}>


)}>
<View style={{ height: 500 }}>
Scroll me


);
}
}

ReactDOM.render(



,
document.getElementById('app')
);

Error:

ERROR in ./node_modules/react-native-parallax-scroll-view/src/index.js 14:26
Module parse failed: Unexpected token (14:26)
You may need an appropriate loader to handle this file type.
| const pivotPoint = (a, b) => a - b
|

const renderEmpty = () =>
|
| const noRender = () => <View style={{ display: 'none' }} />
@ ./src/index.js 21:0-67 67:33-51
@ multi (webpack)-dev-server/client?http://0.0.0.0:3000 (webpack)/hot/dev-serve
r.js ./src/index.js