Bit: styled-components + bitsrc.io

Created on 2 Nov 2018  路  11Comments  路  Source: teambit/bit

Expected Behavior

Render out components properly

Actual Behavior

I can export everything to the scope just fine and am using their React build environment with annotations described in the docs, the builds are passing, and it seems to be pulling in styled-components dependency correctly, but when viewing the file it hangs on rendering...

scope @ https://bitsrc.io/sixsigma/test/cells/button

Steps to Reproduce the Problem

  1. init
  2. build
  3. export to scope

Specifications

  • Bit version: 13.0.4?
  • Node version: 8.9.4
  • npm / yarn version: 6.4.1
  • Platform: os x mojave
  • Bit compiler (include version): bit.envs/compilers/[email protected]
  • Bit tester (include version): N/A
areplayground

Most helpful comment

Do you have an approximate date for the next release? Thanks in advance

All 11 comments

_styled-components_ are known not to bundle correctly, and will be fixed in the near release.
You will be able to use _styled_ from the web editor directly and play with the styling live.

It is going to be awesome

out of curiosity, bundling on which end - the styled-components library or users of the library that are creating custom components using styled-components?

in any case, very much looking forward to it. the idea is to create a custom ui library using styled-components and replace storybook with bitsrc to document/share components across the organisation.

You could read about it in more detail here - https://blog.bitsrc.io/introducing-the-live-react-component-playground-d8c281352ee7

Currently version we include _styled-components_ inside the component bundle itself.

In the next release, you will have access to ES6 imports.
This means you would be able to import a component and style it live.
In addition we blacklisted _styled-components_ from being added to the bundle, and fetch it in a separate bundle.

thanks for the update, will be looking forward to the next release then.

any update on this?

Do you have an approximate date for the next release? Thanks in advance

is it the reason - my component is not rendering - https://bitsrc.io/rivigo/ui/components/avatar

any fix/hack?

Hello,
Any update on that? Do you already know a date for the release where this support is included?

A solution is coming soon :)

Hi @viiralt @CyrusZei @alegadpen-iu @nsisodiya @diemate
The new version is up and running.
Everything with styled component should work fine now on the rendering.
@JoshK2 @guysaar223 Please add some real examples as reference.
I'm keeping this open for a few more days just to see that you don't have any other issues with this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

itaymendel picture itaymendel  路  16Comments

ranm8 picture ranm8  路  14Comments

rap0so picture rap0so  路  13Comments

nvthuong1996 picture nvthuong1996  路  13Comments

drewdecarme picture drewdecarme  路  10Comments