keyz / keyz/identity-obj-proxy

Use it with babel-plugin-react-css-modules

Open
#6 1 comment 5 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
507
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Is there a way to use it with babel-plugin-react-css-modules? There is no need for style object with this install. For example I use it like this.

```
import './titleComponent.local.scss'
const TitleComponent = () => (


Home Scene


logo

)
```
styleName are CSS Modules and className are global (Bootstrap styles) and this is how my snapshot looks when testing with JEST. Instead of just the the name of the class it gives me the whole generated css module name.
```
exports[`should render TitleComponent correctly 1`] = `


Home Scene


logo

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Jest snapshot for the shown TitleComponent with babel-plugin-react-css-modules and identity-obj-proxy. Compare the generated CSS-module names and global class names with the expected snapshot, then confirm the intended integration behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.