Bit: React component and styles

Created on 30 Jan 2019  路  5Comments  路  Source: teambit/bit

Hello,

I've just started to work with Bit but I'm missing some documentation about how the platform renders the components using the @example in the Jsdoc. I've seen some example of components https://bitsrc.io/bit/movie-app/ but I miss some guidelines about what is supported and what is not or how you have to develop your components in order to have them ready for rendering in the platform.

What's style way is recommended for React application in order to see the render example working on the platform? Because I've read at #1310 that styled-components is not supported yet, but I've exported a different component importing my scss file into the component, and I don't see the style on the documentation page.

Specifications

areplayground

Most helpful comment

@diemate Thanks for reporting this (and for the kind words).
We are aware of this issue, and I'm personally working on this issue as we speak.
This does not relate to the fact that your component is private.
I hope it will be fixed in about a week (along with major performance improvements).

All 5 comments

Hi @diemate ,
A new major version of bit and bitsrc just released today.
One of the most improved features is the rendering feature which has a lot of new abilities.
With this version, everything which you can run on create react app should work also in bitsrc.
There is also new better docs.
Please try again now.
You can also follow the new instruction of the movie app project to see how it is working with scss files.

Hi @GiladShoham
I've had a look into the new web, and it looks really good! Congratulations.

But sometimes I have problems with the example compiler. For instance, I'm writing an example for one of my components and sometimes I receive this message Module not found: You seem to be requiring a package ("@bit/diego.myPrivateScope.components.header") which can't be installed As you can see, my scope is a private one, but I think it shouldn't be a problem since I'm writing the example from the own component page itself. The problem is that it isn't a constant error, sometimes it works fine. Any ideas?

@diemate Thanks for reporting this (and for the kind words).
We are aware of this issue, and I'm personally working on this issue as we speak.
This does not relate to the fact that your component is private.
I hope it will be fixed in about a week (along with major performance improvements).

@diemate We have updated the playground a few days ago.
Please re-open if the issue still occurs.

Thank you for the update @GiladShoham :D 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KutnerUri picture KutnerUri  路  12Comments

yairEO picture yairEO  路  19Comments

AmitFeldman picture AmitFeldman  路  22Comments

ranm8 picture ranm8  路  14Comments

nvthuong1996 picture nvthuong1996  路  13Comments