MCPcopy
hub / github.com/anthonyshort/deku / removeItem

Function removeItem

docs/examples/iteration/index.js:30–37  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

28 var { props, state } = component;
29
30 function removeItem(item) {
31 return function() {
32 let updatedItems = state.items.filter(function(target){
33 return target !== item
34 });
35 setState({ items: updatedItems });
36 }
37 }
38
39 function addItem(e){
40 e.preventDefault();

Callers

nothing calls this directly

Calls 1

setStateFunction · 0.85

Tested by

no test coverage detected