Constructor
new DrinkDetails(props)
Initializes state and binds methods
Parameters:
Name | Type | Description |
---|---|---|
props |
Array.<any> | Should contain an drinkId, an order drink callback method, a delete callback method, and parental update and change methods. |
Extends
- React.Component
Methods
componentDidUpdate(prevProps)
Component update callback. Checks for drink ID changes
and refreshes the drink details
Parameters:
Name | Type | Description |
---|---|---|
prevProps |
Array.<any> |
deleteDrink()
Button click callback for deletion. Updates self and parent.
render()
Renders out a fullscreen pannel with all the drink details.
Contains functionality to delete and order