Skip to content

Instantly share code, notes, and snippets.

View Superilya's full-sized avatar

Илья Максимович Superilya

  • Avito
  • Novosibirsk
View GitHub Profile
// load-route-data.js
import { matchPath } from 'react-router-dom';
export default (dispatch, pathname, routes, query) => {
const promises = [];
routes.some(route => {
const match = matchPath(pathname, route);
var gFriends = [
{
name: 'Sam',
friends: ['Mat', 'Sharon'],
gender: 'male',
best: true
},
{
name: 'Sally',
friends: ['Brad', 'Emily'],