Closed ShahAnuj2610 closed 5 years ago
Hi @ShahAnuj2610 what do you mean by "but with the current state," ?
Hi @ShahAnuj2610 what do you mean by "but with the current state," ?
current state, as in my current branch
in the link that I have mentioned
@ShahAnuj2610 I just tried to use jsx
extension on demo app and it's working as expected, I've renamed Example.js
to Example.jsx
in src/lib/components
and it worked fine.
Link you have pasted https://codesandbox.io/s/musing-noether-fe6cc
contains different error: You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
That happens because you are importing external library DataSearch
in App.js
.
For how to use other libraries within your library, please visit: https://github.com/udilia/create-react-library#usage-of-other-libraries-within-your-library thanks!
I have my repo configured as this here => https://github.com/ShahAnuj2610/react-searchbox/tree/npm-publish now when I am exporting simple
<HelloWorld />
fromindex.js
underlib
, it's working perfectly fine, but with the current state, it is exportingundefined
. This is the corresponding code sandbox, where I am using this published npm library => https://codesandbox.io/s/musing-noether-fe6cc