Skip to content

Instantly share code, notes, and snippets.

Avatar
🛰️
Connecting the world!

Ryan Jerue rjerue

🛰️
Connecting the world!
View GitHub Profile
@rjerue
rjerue / iframe.tsx
Created Apr 16, 2020
Detect if iframe is clicked
View iframe.tsx
import React from 'react';
interface IFrameProps {
url: string;
onClick?: () => void;
}
const IFrameComponent: React.FC<IFrameProps> = ({ url, onClick }) => {
const ref = React.useRef<HTMLIFrameElement | null>(null);
React.useEffect(() => {
@rjerue
rjerue / Popover.js
Last active Apr 16, 2020
React Native Web Popovers
View Popover.js
// web
import P, { ArrowContainer } from 'react-tiny-popover'
import React from 'react'
export default ({
visible = false,
position,
onClose,
children,
content = null,
View DeepResolve.js
function decode(input) {
return input && typeof input === 'object'
? Object.entries(input).reduce(async (accum, [key, value]) => {
const [resolvedAccum, resolvedValue] = await Promise.all([accum, value])
let decodedValue = resolvedValue
if (Array.isArray(resolvedValue)) {
decodedValue = await Promise.all(resolvedValue.map(decode))
}
if (resolvedValue && typeof resolvedValue === 'object') {
@rjerue
rjerue / App.js
Created Nov 24, 2018
leaflet-div-icon
View App.js
import React, { Component } from 'react';
import { Map, TileLayer, Marker, Popup } from 'react-leaflet';
import DivIcon from './div-icon';
export default class UserLocationExample extends Component {
constructor(props) {
super(props);
this.mapRef = React.createRef()
this.state = {
hasLocation: true,
latlng: {
View keybase.md

Keybase proof

I hereby claim:

  • I am rjerue on github.
  • I am rjerue (https://keybase.io/rjerue) on keybase.
  • I have a public key whose fingerprint is 7660 6140 925D C768 861D 266B 75CA 4841 43FB 6220

To claim this, I am signing this object:

You can’t perform that action at this time.