Reference Source
public class | source

NotificationView

Extends:

* → NotificationView

Class for the Notification view

Constructor Summary

Public Constructor
public

Creates an instance of the NotificationView.

Member Summary

Public Members
public

state: {"switchValue": boolean, "num": *}

public

updateNum(num: Number): *

Updates the num in the state.

Method Summary

Public Methods
public

Toggle the status of item

public

render()

Renders the react native component.

public

renderIf(condition: Boolean, element: Boolean): Component

Render the element if condition is satisfied

Public Constructors

public constructor() source

Creates an instance of the NotificationView.

Public Members

public state: {"switchValue": boolean, "num": *} source

public updateNum(num: Number): * source

Updates the num in the state.

Public Methods

public onValueChange(value: Boolean) source

Toggle the status of item

Params:

NameTypeAttributeDescription
value Boolean

status of the item

public render() source

Renders the react native component.

public renderIf(condition: Boolean, element: Boolean): Component source

Render the element if condition is satisfied

Params:

NameTypeAttributeDescription
condition Boolean

judge if condition is satisfied

element Boolean

element will be rendered.

Return:

Component

The component if rendered, null otherwise