This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"declaration": true, | |
"importHelpers": false, | |
"esModuleInterop": true, | |
"outDir": "lib", | |
"rootDir": "src", | |
"strict": true, | |
"module": "CommonJS", | |
"moduleResolution": "node", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button | |
class="destroy" | |
onClick={async (e) => { | |
await deleteRow(item.id); | |
items.revalidate(); | |
}} | |
></button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input | |
onChange | |
class="toggle" | |
type="checkbox" | |
checked={item.done} | |
onChange={async (e) => { | |
await updateRow(item.id, { | |
done: e.currentTarget.checked, | |
}); | |
items.revalidate(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import qoreContext from "../qoreContext"; | |
export default function Todo() { | |
const items = qoreContext.views.allTodo.useListRow(); | |
const { | |
insertRow, | |
status, | |
} = qoreContext.views.allTodo.useInsertRow(); | |
const inputRef = React.useRef(null); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Head from "next/head"; | |
import "../styles/globals.css"; | |
function MyApp({ Component, pageProps }) { | |
return ( | |
<> | |
<Head> | |
<link | |
rel="stylesheet" | |
href="https://cdn.jsdelivr.net/npm/todomvc-app-css@2.3.0/index.css" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qoreContext from "../qoreContext"; | |
export default function Todo() { | |
const items = qoreContext.views.allTodo.useListRow(); | |
return (<div>{items.data.length}</div>); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qoreContext from "../qoreContext"; | |
export default function Todo() { | |
const items = qoreContext.views.allTodo.useListRow(); | |
return ( | |
<> | |
<section class="todoapp"> | |
<header class="header"> | |
<h1>todos</h1> | |
<input |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { QoreClient } from "@feedloop/qore-client"; | |
import createQoreContext from "@feedloop/qore-react"; | |
import config from "./qore.config.json"; | |
import schema from "./qore.schema.json"; | |
const client = new QoreClient(config); | |
client.init(schema); | |
const qoreContext = createQoreContext(client); | |
export default qoreContext; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am rrmdn on github. | |
* I am rrmdn (https://keybase.io/rrmdn) on keybase. | |
* I have a public key ASCg4PgFR6yOXwWQYgSCmGnQBEfnGk0dpegbimqINtqBNAo | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const isInQuantity = R.propOr(0, 'quantity'); | |
const isNotIllegal = R.pathEq(false, ['metadata', 'isIllegal']); | |
const isGood = R.pathEq('good', ['metadata', 'status']); | |
const isDamaged = R.pathEq('damaged', ['metadata', 'status']); | |
const available = R.filter(R.allPass([ | |
isInQuantity, | |
isNotIllegal, | |
isGood, |
NewerOlder