2

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.

1 Answers1

1

Identifying the problem

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/

Steps to create a node component in a new environment

bit new node my-workspace --env teambit.node/node --default-scope my-org.my-scope
bit create node modules/welcome

Documentation

For further reference you can check this link in the docs.

Jonatan Kruszewski
  • 1,027
  • 3
  • 23