Skip to content
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.

how to import packages from npm #168

Open
pjebs opened this issue Aug 26, 2018 · 0 comments
Open

how to import packages from npm #168

pjebs opened this issue Aug 26, 2018 · 0 comments

Comments

@pjebs
Copy link

pjebs commented Aug 26, 2018

I am trying to use Sortable from within React.

The instructions state:

npm install sortablejs --save
=====
and then:

<ul id="items">
	<li>item 1</li>
	<li>item 2</li>
	<li>item 3</li>
</ul>

var el = document.getElementById('items');
var sortable = Sortable.create(el);

I can't seem to load the npm library.
Since it's chrome based, it doesn't understand require( )

Is there any instructions for how to "reactify" non-react libraries from within this package?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant