Skip to content

Instantly share code, notes, and snippets.

.wrap
position: fixed
width 100vw
z-index: 999
display flex
background-color white
justify-content: space-between
padding rem(20px)
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
padding-left: 5vw
type messageDescriptor = {. "id": string, "defaultMessage": string};
[@bs.module "react-intl"]
external defineMessages : Js.Dict.t(messageDescriptor) => Js.Dict.t(messageDescriptor) =
"";
module FormattedMessage = {
[@bs.module "react-intl"] external formatMessage : ReasonReact.reactClass = "FormattedMessage";
let make =
(
@AlexSchwabauer
AlexSchwabauer / Functor.re
Created January 24, 2018 16:18
Functor Reason React Example
module type OrderFilterArrayType = {
type t;
type filterName;
let reduceFilter: (filterName, array(t)) => array(t);
type itemID;
let getItemID: t => itemID;
let findOneIndex: (itemID, array(t)) => option(int);
};
module Make = (Item: OrderFilterArrayType) => {
@AlexSchwabauer
AlexSchwabauer / main.js
Last active May 13, 2024 11:23
Promise from desktopCapturer.getSources does not resolve without permission grant
const {
app,
BrowserWindow,
desktopCapturer,
} = require("electron");
app.whenReady().then(() => {
let promise;
const interval = setInterval(() => {
console.log("Promise state", promise);