Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I actually use this? #3

Closed
mingfang opened this issue Jan 20, 2015 · 3 comments
Closed

How do I actually use this? #3

mingfang opened this issue Jan 20, 2015 · 3 comments

Comments

@mingfang
Copy link

The example on the github page does not even compiler due to this ...{setting}.
I can't fine the react-slider.js anyway but managed to cut and paste it from http://webrafter.com/opensource/react-slick by viewing the source.
But even then, I'm getting this error at runtime
Uncaught ReferenceError: webpackJsonp is not definedreact-slick.js:1 (anonymous function)

@mingfang mingfang changed the title How do actually use this? How do I actually use this? Jan 21, 2015
@akiran
Copy link
Owner

akiran commented Jan 21, 2015

As of now you have to use a build tool like browserify or webpack.
This yeoman generator help you setup quickly.

{...settings} is es6 feature and require react 0.12
If you are using jsx loader add harmony flag and if you are using reactify add {es6: true} to your browserify config

I am not providing react-slider.js because it is a good practice to avoid exposing react component on global and it is better to use a build tool.

Let me know your feedback.

@mingfang
Copy link
Author

Thanks for the response.
Unfortunately I'm a server guy and do not know anything about front end stacks, therefore I have not idea what to do next.
Take jquery.js for example.
I'm able to just point to it using a script tag and use it straight away, without having to build it.
That seems much for user friendly.
Closing since it appears to work for you.

@akiran
Copy link
Owner

akiran commented Jan 21, 2015

If you work on server (Java, ruby or python etc) you must be already familiar with module system.
Same sort of module system can be used Javascript.

Jquery uses globals because at the time of its creation there was no module system and build tools
Now javascript is maturing and borrowing ideas like module system from server side languages like python, ruby.

I haven't provided bundled packages because it is not a good practice now.
You will loving using a build system after passing the initial setup hurdle.
let me know if you need help in setting up.

Just curious. Are you able able to find bundled packages for other opensource react components?

jasondecastro added a commit to lgfairmont/react-slick that referenced this issue Oct 17, 2018
yoyo837 pushed a commit to yoyo837/react-slick that referenced this issue Jun 2, 2020
Co-authored-by: Hullen Gonzales <hullen.geomais@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants