Skip to content

Instantly share code, notes, and snippets.

View defusioner's full-sized avatar
🎭

Boris Koretski defusioner

🎭
View GitHub Profile
@defusioner
defusioner / Component.css.tsx
Last active June 27, 2020 09:47
Opinionated Jetbrains file templates for components written with TypeScript. The flow: Component -> CSS-in-JS (Emotion) -> tests -> stories
import { css } from 'emotion'
export const root = css``
import { getPollingRegistration } from '../selectors/ui'
import { registerPolling, unregisterPolling } from '../modules/ui'
import { DEFAULT_POLLING_TIMEOUT } from '../../constants/ui/polling'
/**
* Creates a polling bucket and registers it to the redux store.
* Buckets should have a unique name, otherwise the polling request is ignored.
*
* @param {string} name - Polling name. It is allowed to only have 1 unique polling at a time.
* @param {object} options