Skip to content

Instantly share code, notes, and snippets.

View sauldeleon's full-sized avatar
🎮

Saúl de León Guerrero sauldeleon

🎮
View GitHub Profile
@sauldeleon
sauldeleon / style.css
Created May 24, 2022 07:04 — forked from laurazenc/style.css
Solve blurry fonts
* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@sauldeleon
sauldeleon / 1.SomeComponent.stories.js
Last active September 5, 2020 12:36
Storybook meets axios meets redux meets thunk
/**
This is my workarround to create a React Story for a component which internally dispatch multiple thunk actions
and also retrieve info from some server. This works also on making an story in which its main component wraps another redux
connected components.
*/
/**
BEHAVIOUR EXPLANATION
This component depends on an ID (fetchingDataId) which is stored in the parent component which contains many SomeComponents, so I need to mock the store before SomeComponent's story loads
Then, when a single SomeComponent loads, it renders two connected subcomponents which I dont have control from Storybook. And I want the story to render both components at the same time.