Every line of 'props history push' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
6 function pushHistory(e, props) { 7 e.preventDefault() 8 props.onClick && props.onClick() 9 history.push({ 10 pathname: props.to, 11 search: e.target.search 12 }) 13 }
28 push(params = {}) { 29 return NavigationSpecific.push(this, params); 30 }
19 push(props, route) { 20 if(!props){ 21 props = {}; 22 } 23 route.props = props; 24 this.navigator.push(route); 25 }
28 push(props, route) { 29 let routesList = this.navigator.getCurrentRoutes() 30 let nextIndex = routesList[routesList.length - 1].index + 1 31 route.props = props 32 route.index = nextIndex 33 this.navigator.push(route) 34 }
48 export function pushHistoryPath(history, path, search) { 49 pushOrUpdateHistory(history, false, null, null, path, search); 50 }
23 export function History(props: HistoryProps) { 24 React.useEffect(() => { 25 if (process.env.NODE_ENV !== 'production') { 26 console.warn( 27 `Deprecation Warning: "" is deprecated. It will be removed in a future version.`, 28 ) 29 } 30 }, []) 31 32 return ( 33 34 {context => props.children(context.navigation._history)} 35 36 ) 37 }
20 setHistory(history: CustomHistory) { 21 this.history = history 22 }
76 push(state) { 77 const newHistory = this.merge({ 78 undos: this.undos.push(snapshot(state, this.merged)), 79 redos: new Stack(), 80 merged: 1 81 }); 82 83 return newHistory.prune(); 84 }
166 componentWillReceiveProps(nextProps, nextContext) { 167 if (nextContext.historyList.length !== this.context.historyList.length) { 168 LayoutAnimation.easeInEaseOut(); 169 } 170 }
4 push (action) { 5 this.state = this.reduce(this.state, [action]) 6 return this.rerender() 7 }