Skip to content

Instantly share code, notes, and snippets.

View TimDeve's full-sized avatar
🌊
Working

Tim Dévé TimDeve

🌊
Working
View GitHub Profile
@TimDeve
TimDeve / DataPage.tsx
Created February 17, 2020 13:52
useGateway hook with API request type safety
import React from 'react';
import useGateway from './useGateway'
function DataPage(): ReactElement | null {
const [loading, error, data] = useGateway(fetchData, defaultData);
if (loading) return null;
if (RequestError.is(error) && error.httpStatus === 404) {
### Keybase proof
I hereby claim:
* I am timdeve on github.
* I am timdeve (https://keybase.io/timdeve) on keybase.
* I have a public key ASAhJ1pRJRkn4rfP90vGaDMJ-5eHqtapQQPPfgXGIkL2EQo
To claim this, I am signing this object:
@TimDeve
TimDeve / RubyNext.tmLanguage
Created December 10, 2015 14:02 — forked from edubkendo/RubyNext.tmLanguage
A better ruby syntax highlighter for sublime text. Combines the ruby bundle with ST, recent updates to the textmate bundle, and a tmLanguage file called "Experimental Ruby".
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>
TODO: unresolved issues
text: