Skip to content

Instantly share code, notes, and snippets.

View NikkiSiapno's full-sized avatar

Nikki Siapno NikkiSiapno

View GitHub Profile

Keybase proof

I hereby claim:

  • I am nicolesiapno on github.
  • I am nikki_siapno (https://keybase.io/nikki_siapno) on keybase.
  • I have a public key ASBsOCeULvg3-RghPOwShSl20yy3yUloNIl_7bIIk9OXlgo

To claim this, I am signing this object:

exports.handler = function(event, context, callback) {
try {
// your code would go here
callback(null, res)
} catch(err) {
callback(err)
}
}
const fetchData = require('./fetch.js')
exports.handler = async (event, context) => {
return await fetchData(event, context)
}
<div>
<slot>
<!-- if this component is rendered without any children, the following -->
<!-- text is shown -->
<em>no content was provided</em>
</slot>
</div>
<script>
let big = false
</script>
<style>
.big {
font-size: 4em;
}
</style>
<script>
import { fly } from 'svelte/transition'
let isVisible = true
let animationStatus = 'waiting...'
</script>
<p>Animation status: {animationStatus}</p>
<label>
<script>
import { name, greating, time } from './stores.js';
</script>
<h1>{greeting}</h1>
<p>The time is: {time}</p>
<p>{name}, what would you like to do today?</p>
import { writable, derived, readable } from 'svelte/store'
export const name = writable('world')
export const greeting = derived(
name,
$name => `Hello ${$name}!`
)
export const time = readable(
import React, { useRef } from "react"
const Example = () => {
const boxEl = useRef()
return (
<>
<div ref={boxEl}>
<h1>Hello world!</h1>
</div>
<script>
let boxEl
</script>
<div bind:this={boxEl}>
<h1>Hello World!</h1>
</div>