Skip to content

Instantly share code, notes, and snippets.

View sebastianfrey's full-sized avatar
🏢
Working from office

Sebastian Frey sebastianfrey

🏢
Working from office
  • M.O.S.S Computer Graphik Systeme GmbH
  • Munich
View GitHub Profile
@sebastianfrey
sebastianfrey / makeLayer.tsx
Created December 7, 2022 12:24
Connect @arcgis/core to React
import React, { useEffect, useState, useMemo } from 'react';
import { useEvents, usePrevious, useWatchables, WatchKeys } from '@moss/react-hooks';
import { LayerBaseProps } from './interfaces';
import useMap from '../../hooks/useMap';
import isEqual from 'lodash-es/isEqual';
const defaultOnProp = {};
const defaultWatchProp = {};
export type LayerConstructor<T> = new (...params: any[]) => T;
@sebastianfrey
sebastianfrey / index.js
Last active July 10, 2018 19:59
Example for @konmuc/authc and @konmuc/authz usage.
// import the @konmuc/authc dependencies
const express = require('express');
const mongoose = require('mongoose');
const { Schema } = mongoose;
const bodyParser = require('body-parser');
// import the @konmuc/authc middleware and router
const authc = require('@konmuc/authc');
const authcRouter = require('@konmuc/authc/router');