Code example for CX and Custom Components documentation isn't functional
See original GitHub issueThe example provided in the documentation for how to use the CX function with Custom Components (here) does not appear to be working properly both on the site and on the sandbox.
CodeSandbox claims that there is a missing reference to Emotion, but even after adding it, the custom component is still missing all styling.
Investigating further, it appears that the option DOM class attribute is rendering as the string value of [object Object]
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Customizing CMS Components - Spartacus Documentation
The mapping is provided in a configuration that can be customized. This allows you to configure a custom component to render a specific...
Read more >React's new killer documentation focused only on functional ...
React's new killer documentation focused only on functional components. It's no secret that the old React documentation is useless most of ...
Read more >Configure a Component for Experience Builder
Configure a Component for Experience Builder. Make a custom Lightning web component available in Experience Builder, where users can add it to the...
Read more >Developing Open Storefront Framework Applications for ...
If the JSON document does not include operationId values, use the zero-based index of the ordering of the REST endpoints in the document....
Read more >Writing Custom Components | Prismatic Docs
Sample component code is referenced throughout this page. ... which is an async function with two parameters that may or may not have...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ebonow Following should be all the changes needed to make the example work again:
The
jsx
import from@emotion/core
replaces theReact
import that is needed on every React file. This also includes the functionality of thecss
prop. The comment on the top tells the compiler to usejsx
instead ofReact
.Thanks for working this out @Rall3n and @ebonow, I’ve created a PR with the necessary changes.
Could you please have a look at PR https://github.com/JedWatson/react-select/pull/4112 and give me the go ahead to release it.
Thank you!