Class: MemoryCard

MemoryCard()

MemoryCard component creats a card view of the memories created or shared by the user. This component is repeatedly used in Profile and Feed component.

Constructor

new MemoryCard()

Source:

Classes

MemoryCard

Methods

componentDidMount()

As soon as component is loaded, comment, stars data are updated immediately.

Source:

doComment(event)

Adds comment for the memory. It immediately updates comment in UI but stars gets updated in db in background asynchronously.

Parameters:
Name Type Description
event Object

Event object

Source:

doReact()

Adds star for the memory. It immediately updates UI but stars gets updated in db in background asynchronously.

Source:

doReport()

Prompts user to add reason for report, and sends the details to backend

Source:

render()

Renders the card view of memory using props and state of the component.

Source:

textInputHandler(event)

Executes at each keystroke of user for any input text field in the component. As soon as it receives any keystroke from user, this method updates the state of the component accordingly.

Parameters:
Name Type Description
event Object

Event object

Source: