Comments (7)
Thanks @RussMax783 and @zacanger, the new version is pure babel and I took your minimal breaking case and added it to the repo as a simple test.
You can make scroll containers now too, so you'll have to import { Watch } from 'scrollmonitor-react'
. Version bump to 2.0 too, since it's a breaking change.
Thanks again for your help.
from scrollmonitor-react.
Minimal example: https://github.com/zacanger/scrollmonitor-react-issue-2
from scrollmonitor-react.
Are you working on something small that I could clone and try out?
What version of Node are you on?
from scrollmonitor-react.
Node: v6.7.0
unfortunately its a pretty large project that i cant do that... But here is what i've found...
I copied your index.js file and put it into my own component and it worked. So im pretty sure it has something to do with your build.
putting "main": "dist/index.js"
in your package.json will point to make sure everyone is using the build you have in dist
.
Like i said above, when i am able to run dist/index.js
i get scrollMonitor is not defined, and looking at index.js line 175, scrollMonitor is not defined anywhere. Maybe because you're marking scrollmonitor as an external? in webpack.config.js
from scrollmonitor-react.
Removing the externals obj and running webpack
builds as expected. Not sure what the intention is with those options, but unless I misunderstand externals
, I think that would only work if React, ReactDOM, and scrollMonitor were exposed on window
?
from scrollmonitor-react.
That's it. The externals lets webpack build it without including the files, but that's not the solution I should have used.
from scrollmonitor-react.
Thanks very much!
from scrollmonitor-react.
Related Issues (14)
- How do use locking? HOT 2
- initial load with elements in view are set to wrong state HOT 1
- questions regarding offsets HOT 2
- Outer props override inner props
- setState is being called after component is unmounted
- PropTypes from prop-types package
- Events - onEnter, onEnd
- Trigger event at specific percentage view of the component HOT 4
- Feature request: Throttle onscroll event HOT 1
- React 16 HOT 5
- Change offset values dynamically HOT 1
- Change initial value for props HOT 2
- Feature Request: PureWatch HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrollmonitor-react.