Skip to content

Instantly share code, notes, and snippets.

@fabien
fabien / example.js
Last active October 20, 2021 15:17 — forked from SimeonGriggs/example.js
A "listening" version of usePreviewSubscription() that re-queries the client. Not yet recommended for Production use.
const { data, loading } = useListeningQuery(
query,
{
params: params ?? {},
initialData: page,
enabled: preview,
delay: 250,
}
);
@fabien
fabien / gist:47601
Created January 15, 2009 20:24 — forked from smoofles/gist:47583
##################### lpl_content => lpl_core_main (partial: views/shared/_main)
<div id='lpl_content'>
<!-- this is where the main views go to, like index/list, edit, view actions -->
</div>
##################### lpl_app_header => lpl_core_header (partial: views/shared/_header)
<div id='lpl_app_header'>
@fabien
fabien / goals.txt
Created September 15, 2008 17:33 — forked from carllerche/goals.txt
How do we generate the following?
From inside a slice, generate a route that stays inside the slice.
From inside a slice, generate a route that goes to another slice.
From inside a slice, generate a route that goes to the main application.
From the main application, generate a route to a slice route.
#!/usr/bin/env ruby
module Fabulous
def self.included(base)
base.send :remove_method, :name
end
def name
"Fabulous"
end