reactjs - Integrating a electrode component in to app -
i have created electrode component using archetype 'yo electrode:component' let's call ptd-product-tile(the component class named 'ptdproducttile'. created , application using 'yo electrode' let's call ptd-frame. published component npm repository , added dependencies in package.json of application. when try import component in 'frame/src/client/components/home.jsx' using below line see error.
import { ptdproducttile } 'ptd-product-tile';
the error see here
./src/client/components/home.jsx module not found: error: can't resolve 'ptd-product-tile' in '/users/xyz/code/frame/src/client/components' @ ./src/client/components/home.jsx 35:22-49 @ ./src/client/routes.jsx @ ./src/client/app.jsx @ multi (webpack)
i see component downloaded in node_modules in application don't know how can use in application. can help?
here example electrode application, generated , unmodified, except changes add electrode component.
the component generated , unmodified.
- app: https://github.com/electrode-io/electrode-demo-app
- component: https://github.com/electrode-io/electrode-demo-component
- published: https://www.npmjs.com/package/electrode-demo-component
- commit app use component: https://github.com/electrode-io/electrode-demo-app/commit/e320050c2c1ae8f0f5876c2ec2d972ef31a901a9
i hope helps.
Comments
Post a Comment