Reputation: 21
We are trying to build a shared React component library in Bit and I'm wondering how others have handled util modules that are called from a component but are not visually rendered. Bit refuses to build, saying that the util module is not a jsx (it shouldn't be a jsx, it's shared utilities for the different components).
In before "that should be a hook" and "creating a non-rendering react component" - it's text / date / etc utility functions.
Thanks for any help!
I tried to include the js file in the component directory, and it refused it because it's a non-rendering, non-.jsx file.
Upvotes: 2
Views: 151
Reputation: 1286
I think that your problem comes from using a react template and not a node.js one.
For example, here you can access the full Bit.cloud "Toolbox", and use as example.
https://bit.cloud/teambit/toolbox/
bit new node my-workspace --env teambit.node/node --default-scope my-org.my-scope
bit create node modules/welcome
For further reference you can check this link in the docs.
Upvotes: 1