MCPcopy Create free account
hub / github.com/ptmt/react-native-macos / getInitialState

Function getInitialState

Examples/UIExplorer/js/MenuExample.macos.js:19–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18const MenuManagerExample = React.createClass({
19 getInitialState() {
20 return {
21 title: 'Example',
22 itemTitle: '',
23 items: [{
24 title: 'First submenu',
25 key: 'f',
26 callback: () => AlertIOS.alert('Menu Example', 'You have clicked on the test item', [
27 {text: 'OK', onPress: () => console.log('OK Pressed!')},
28 ])
29 }]
30 };
31 },
32
33 _addNewSubmenu() {
34 MenuManager.addSubmenu(this.state.title, this.state.items);

Callers

nothing calls this directly

Calls 2

logMethod · 0.65
alertMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…