createDomain(name?)
Creates a domain
Arguments
name
? (string): Domain name
Returns
Domain: New domain
Example
import {createDomain} from 'effector'
const domain = createDomain() // Unnamed domain
const httpDomain = createDomain('http') // Named domain
const statusCodeChanged = httpDomain.createEvent()
const downloadFx = httpDomain.createEffect()
const apiDomain = httpDomain.createDomain() // nested domain
const $data = httpDomain.createStore({status: -1})