### Type parameters

- S
- SS
- S

### Hierarchy

- Component<FlexProps>
  - Flex

### Constructors

### Properties

### Accessors

### Methods

## Constructors

### constructor

- new Flex(props: FlexProps): Flex

#### Parameters

- props: FlexProps

#### Returns Flex

Overrides SettingSubTitle.constructor

- Defined in LightcordApi/src/components/general/Flex.tsx:27

## Properties

### context

context: any

If using the new style context, re-declare this in your class to be the `React.ContextType` of your `static contextType`. Should be used with type annotation or static contextType.

    static contextType = MyContext
    // For TS pre-3.7:
    context!: React.ContextType<typeof MyContext>
    // For TS 3.7 and above:
    declare context: React.ContextType<typeof MyContext>

#### see

https://reactjs.org/docs/context.html

Inherited from Button.context

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:483

### Readonly props

props: Readonly<FlexProps> & Readonly<object>

Inherited from Button.props

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:508

### refs

refs: object

#### deprecated

https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs

Inherited from Button.refs

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:514

### state

state: Readonly<S>

Inherited from Button.state

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:509

### Static Optional contextType

contextType: Context<any>

If set, `this.context` will be set at runtime to the current value of the given Context.

Usage:

    type MyContext = number
    const Ctx = React.createContext<MyContext>(0)

    class Foo extends React.Component {
      static contextType = Ctx
      context!: React.ContextType<typeof Ctx>
      render () {
        return <>My context's value: {this.context}</>;
      }
    }

#### see

https://reactjs.org/docs/context.html#classcontexttype

Inherited from Button.contextType

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:465

## Accessors

### modules

- get modules(): any

#### Returns any

- Defined in LightcordApi/src/components/general/Flex.tsx:32

### Static Align

- get Align(): object

#### Returns object

- ##### BASELINE: string

- ##### CENTER: string

- ##### END: string

- ##### START: string

- ##### STRETCH: string

- Defined in LightcordApi/src/components/general/Flex.tsx:52

### Static AllPreviews

- get AllPreviews(): any

#### Returns any

- Defined in LightcordApi/src/components/general/Flex.tsx:80

### Static Direction

- get Direction(): object

#### Returns object

- ##### HORIZONTAL: string

- ##### HORIZONTAL_REVERSE: string

- ##### VERTICAL: string

- Defined in LightcordApi/src/components/general/Flex.tsx:44

### Static Justify

- get Justify(): object

#### Returns object

- ##### AROUND: string

- ##### BETWEEN: string

- ##### CENTER: string

- ##### END: string

- ##### START: string

- Defined in LightcordApi/src/components/general/Flex.tsx:62

### Static Wrap

- get Wrap(): object

#### Returns object

- ##### NO_WRAP: string

- ##### WRAP: string

- ##### WRAP_REVERSE: string

- Defined in LightcordApi/src/components/general/Flex.tsx:72

## Methods

### Optional UNSAFE_componentWillMount

- UNSAFE_componentWillMount(): void

Called immediately before mounting occurs, and before `Component#render`. Avoid introducing any side-effects or subscriptions in this method.

This method will not stop working in React 17.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

#### Returns void

Inherited from Button.UNSAFE_componentWillMount

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:709

### Optional UNSAFE_componentWillReceiveProps

- UNSAFE_componentWillReceiveProps(nextProps: Readonly<FlexProps>, nextContext: any): void

Called when the component may be receiving new props. React may call this even if props have not changed, so be sure to compare new and existing props if you only want to handle changes.

Calling `Component#setState` generally does not trigger this method.

This method will not stop working in React 17.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

#### Parameters

- nextProps: Readonly<FlexProps>
- nextContext: any

#### Returns void

Inherited from Button.UNSAFE_componentWillReceiveProps

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:741

### Optional UNSAFE_componentWillUpdate

- UNSAFE_componentWillUpdate(nextProps: Readonly<FlexProps>, nextState: Readonly<S>, nextContext: any): void

Called immediately before rendering when new props or state is received. Not called for the initial render.

Note: You cannot call `Component#setState` here.

This method will not stop working in React 17.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

#### Parameters

- nextProps: Readonly<FlexProps>
- nextState: Readonly<S>
- nextContext: any

#### Returns void

Inherited from Button.UNSAFE_componentWillUpdate

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:769

### Optional componentDidCatch

- componentDidCatch(error: Error, errorInfo: ErrorInfo): void

Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.

#### Parameters

- error: Error
- errorInfo: ErrorInfo

#### Returns void

Inherited from Button.componentDidCatch

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:638

### Optional componentDidMount

- componentDidMount(): void

Called immediately after a component is mounted. Setting state here will trigger re-rendering.

#### Returns void

Inherited from Button.componentDidMount

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:617

### Optional componentDidUpdate

- componentDidUpdate(prevProps: Readonly<FlexProps>, prevState: Readonly<S>, snapshot?: SS): void

Called immediately after updating occurs. Not called for the initial render.

The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.

#### Parameters

- prevProps: Readonly<FlexProps>
- prevState: Readonly<S>
- snapshot: SS Optional

#### Returns void

Inherited from Button.componentDidUpdate

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:680

### Optional componentWillMount

- componentWillMount(): void

Called immediately before mounting occurs, and before `Component#render`. Avoid introducing any side-effects or subscriptions in this method.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

#### Returns void

Inherited from Button.componentWillMount

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:695

### Optional componentWillReceiveProps

- componentWillReceiveProps(nextProps: Readonly<FlexProps>, nextContext: any): void

Called when the component may be receiving new props. React may call this even if props have not changed, so be sure to compare new and existing props if you only want to handle changes.

Calling `Component#setState` generally does not trigger this method.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

#### Parameters

- nextProps: Readonly<FlexProps>
- nextContext: any

#### Returns void

Inherited from Button.componentWillReceiveProps

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:724

### Optional componentWillUnmount

- componentWillUnmount(): void

Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as cancelled network requests, or cleaning up any DOM elements created in `componentDidMount`.

#### Returns void

Inherited from Button.componentWillUnmount

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:633

### Optional componentWillUpdate

- componentWillUpdate(nextProps: Readonly<FlexProps>, nextState: Readonly<S>, nextContext: any): void

Called immediately before rendering when new props or state is received. Not called for the initial render.

Note: You cannot call `Component#setState` here.

Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps prevents this from being invoked.

#### Parameters

- nextProps: Readonly<FlexProps>
- nextState: Readonly<S>
- nextContext: any

#### Returns void

Inherited from Button.componentWillUpdate

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:754

### forceUpdate

- forceUpdate(callback?: function): void

#### Parameters

- callback: function Optional
  - - (): void

    - #### Returns void

Inherited from Button.forceUpdate

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:500

### Optional getSnapshotBeforeUpdate

- getSnapshotBeforeUpdate(prevProps: Readonly<FlexProps>, prevState: Readonly<S>): SS | null

Runs before React applies the result of `render` to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before `render` causes changes to it.

Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated lifecycle events from running.

#### Parameters

- prevProps: Readonly<FlexProps>
- prevState: Readonly<S>

#### Returns SS | null

Inherited from Button.getSnapshotBeforeUpdate

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:674

### render

- render(): Element

#### Returns Element

Overrides Component.render

- Defined in LightcordApi/src/components/general/Flex.tsx:36

### setState

- setState<K>(state: function | S | object, callback?: function): void

#### Type parameters

- K: keyof S

#### Parameters

- state: function | S | object
- callback: function Optional
  - - (): void

    - #### Returns void

Inherited from Button.setState

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:495

### Optional shouldComponentUpdate

- shouldComponentUpdate(nextProps: Readonly<FlexProps>, nextState: Readonly<S>, nextContext: any): boolean

Called to determine whether the change in props and state should trigger a re-render.

`Component` always returns true. `PureComponent` implements a shallow comparison on props and state and returns true if any props or states have changed.

If false is returned, `Component#render`, `componentWillUpdate` and `componentDidUpdate` will not be called.

#### Parameters

- nextProps: Readonly<FlexProps>
- nextState: Readonly<S>
- nextContext: any

#### Returns boolean

Inherited from Button.shouldComponentUpdate

- Defined in LightcordApi/node_modules/@types/react/index.d.ts:628

Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.