Reusable components for applications
npm run start:library
Linked apps will automatically update to use latest compiled version by watching.
npm run start
-
Make the repo available for linking with other apps
cd /path/to/adventure-component-library npm link
-
Link to library in other app
cd /path/to/my-application npm link /path/to/adventure-component-library
Using library in other app simplest example:
import React from "react";
import { Explorer, sites } from "adventure-component-library";
function App() {
return (
<div className="App">
<Explorer site={sites.ginandjuice} />
</div>
);
}
export default App;