Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Ivan Jeremic ivanjeremic

💭
I may be slow to respond.
View GitHub Profile
@ivanjeremic
ivanjeremic / html.js
Created December 17, 2022 19:07
html template literal
View html.js
export function html(literals: { raw: any }, ...vars: any[]) {
let raw = literals.raw,
HTMLprecompiled = "",
i = 1,
len = arguments.length,
str,
variable;
while (i < len) {
str = raw[i - 1];
View proxy-compiled.js
const state = new Proxy(defaultState, {
set(target, value, reciver) {
switch (value) {
case "val":
document.getElementById(
"_6bb6g"
).textContent = `increment ${target.val} and ${target.val}`;
break;
case "val":
@ivanjeremic
ivanjeremic / React_Context_Typescript_Snippet_VSCODE
Last active April 29, 2020 03:05
React_Context_Typescript_Snippet_VSCODE
View React_Context_Typescript_Snippet_VSCODE
{
"Context_Typescript": {
"prefix": "ctxts",
"body": [
"import React, { useReducer } from 'react';",
"",
"/* ***** */",
"/* Types */",
"/* ***** */",
"interface Props {",