This file contains 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
export default function transformImportsPlugin({ types }) { | |
return { | |
visitor: { | |
ImportDeclaration(path) { | |
const importSource = path.node.source.value | |
if (importSource !== "solid-js/web") return | |
const solidWebIdentifier = types.Identifier("solidjsWeb") |
This file contains 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
use super::hyperlink::Hyperlink; | |
use eframe::{egui, epi}; | |
use egui::{pos2, vec2, Color32, Pos2, Rect, Stroke, Widget}; | |
use rand::seq::SliceRandom; | |
#[derive(Copy, Clone, Debug, PartialEq)] | |
enum Player { | |
User, | |
Computer, | |
} |
This file contains 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 vegaEmbed from 'https://cdn.skypack.dev/vega-embed'; | |
export default (element) => ({ | |
render: (value) => { | |
vegaEmbed(element, value); | |
}, | |
}) |
This file has been truncated, but you can view the full file.
This file contains 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
!function(A){var e={};function t(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return A[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=A,t.c=e,t.d=function(A,e,i){t.o(A,e)||Object.defineProperty(A,e,{enumerable:!0,get:i})},t.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},t.t=function(A,e){if(1&e&&(A=t(A)),8&e)return A;if(4&e&&"object"==typeof A&&A&&A.__esModule)return A;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:A}),2&e&&"string"!=typeof A)for(var r in A)t.d(i,r,function(e){return A[e]}.bind(null,r));return i},t.n=function(A){var e=A&&A.__esModule?function(){return A.default}:function(){return A};return t.d(e,"a",e),e},t.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},t.p="",t(t.s=224)}([function(A,e,t){"use strict";function i(A){return A&&0===A.length}function r(A){return null==A?[]:Object.keys( |
This file contains 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 f = useMemo(() => { | |
try { | |
return new Function('inputs', `return ${expression}`); | |
} catch (e) { | |
return [e]; | |
} | |
}, [expresssion]); | |
// input atoms |
This file contains 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
>>>> Start compiling | |
[3/3] Building src/Server-Server.cmj | |
FAILED: src/Server-Server.cmj src/Server-Server.cmi /Users/paulshen/Code/spotify-listening-room/server/src/Server.bs.js | |
/Users/paulshen/Code/spotify-listening-room/server/node_modules/bs-platform/darwin/bsc.exe -bs-package-name server -bs-ns Server -bs-package-output commonjs:src -color always -bs-suffix -I . -I src -I ../isomorphic -I /Users/paulshen/Code/spotify-listening-room/server/node_modules/bs-express/lib/ocaml -I /Users/paulshen/Code/spotify-listening-room/server/node_modules/bs-fetch/lib/ocaml -I /Users/paulshen/Code/spotify-listening-room/server/node_modules/reason-promise/lib/ocaml -I /Users/paulshen/Code/spotify-listening-room/server/node_modules/@ahrefs/bs-dotenv/lib/ocaml -I /Users/paulshen/Code/spotify-listening-room/server/node_modules/bs-socket/lib/ocaml -I /Users/paulshen/Code/spotify-listening-room/server/node_modules/@glennsl/bs-json/lib/ocaml -warn-error +101 -o src/Server-Server.cmj src/Server.reast | |
We've found a bug for you |
This file contains 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"; | |
// Even though <InnerBody> unmounts (and remounts), this Fiber holds a reference to | |
// the initial <InnerBody> fiber node. | |
function Sidebar() { | |
React.useEffect(() => { | |
console.log("Sidebar"); | |
}); | |
return <div>Sidebar (look at my nextEffect chain)</div>; | |
} |
This file contains 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
function useMemo(f, deps) { | |
const state = React.useRef(); | |
if (state.current != null) { | |
const [prevDeps, prevResult] = state.current; | |
if (areArraysShallowEqual(deps, prevDeps)) { | |
return prevResult; | |
} | |
} | |
const result = f(); | |
state.current = [deps, result]; |
This file contains 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
window.fbAsyncInit = function() { | |
// Fix in Parse's date parser | |
var _parseDate = Parse._parseDate; | |
Parse._parseDate = function(str) { | |
return new Date(Date.parse(str)); | |
}; | |
Parse.FacebookUtils.init({ | |
appId : '123', // Facebook App ID | |
version : 'v2.0' |
This file contains 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
// first pass | |
<div>{ | |
a: <p><ExpensiveWidget /></p> | |
}</div> | |
// second pass | |
<div>{ | |
b: <p>new paragraph</p>, |