Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import extend from 'just-extend';
import objectReduce from 'just-reduce-object';
import Menu from './Menu';
import Page from './Page';
import data from '../data';
const codeLookup = objectReduce(
data,
(acc, key, value) => {
return extend(acc, value.utils);
},
{}
);
// window.onpopstate = function() {
// alert("location: " + document.location);
// // this.setState({selectedFn: location.href.split('/').pop()});
// }
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = { selectedFn: this.fnFromUrl(location.href) };