createDomain(name?)
Creates a domain
Arguments
name
? (string): Domain name
Returns
(Domain
): Namespace for your events, stores and effects.
Example
const domain = createDomain() // Unnamed domain
const httpDomain = createDomain('http') // Named domain
const statusCode = httpDomain.event('status code')
const download = httpDomain.effect('download')
const apiDomain = httpDomain.domain('api') // nested domain
const data = httpDomain.store({status: -1})