class ReactStubs

A collection of React.js view, component, and util stubs.

Methods

static string
defaultComponentTemplate(string $componentName)

Generates a component with default export.

static string
errorNotFound()

Stub for restoring required error/NotFound.jsx page component if accidentally deleted.

static string
hookTemplate(string $hookName)

Returns contents for a new hook file.

static string
namedComponentTemplate(string $componentName)

Generates a named export component.

static string
profileImageSorter()

Stub for ProfileImageSorter.jsx component.

Details

at line 15
static string defaultComponentTemplate(string $componentName)

Generates a component with default export.

Parameters

string $componentName

The name of the component.

Return Value

string

The contents of the component.

at line 36
static string errorNotFound()

Stub for restoring required error/NotFound.jsx page component if accidentally deleted.

Return Value

string

Contents of the error/NotFound.jsx page component.

at line 56
static string hookTemplate(string $hookName)

Returns contents for a new hook file.

Parameters

string $hookName

The name of the hook.

Return Value

string

The contents of the new hook file.

at line 73
static string namedComponentTemplate(string $componentName)

Generates a named export component.

Parameters

string $componentName

The name of the component.

Return Value

string

The contents of the component.

at line 91
static string profileImageSorter()

Stub for ProfileImageSorter.jsx component.

Return Value

string

The contents of ProfileImageSorter.jsx file.