EffectFactory
Set of factory functions for building router Effect.
Deprecation warning
With an introduction of Marble.js 3.0, old EffectFactory HTTP route builder is deprecated. Please user.pipe builder instead.
Importing
import { EffectFactory } from '@marblejs/core';matchPath
matchPathEffectFactory namespace function. Matches request path for connected Effect.
Type declaration
matchPath :: string -> matchTypeParameters
parameter
definition
path
string
Returns
EffectFactory matchType function
matchType
matchTypeEffectFactory namespace function. Matches HTTP method type for connected Effect.
Type declaration
Parameters
parameter
definition
type
HttpMethod = 'POST | 'PUT' | 'PATCH' | 'GET' | 'HEAD' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | '*'
Returns
EffectFactory use function
use
useEffectFactory namespace function. Connects Effect with path and HTTP method type.
Type declaration
Parameters
parameter
definition
effect
HttpEffect function
Returns
Factorized RouteEffect object.
Example
Last updated