Skip to content

Instantly share code, notes, and snippets.

@mercedesb
mercedesb / ContextExample.js
Created September 20, 2020 17:27
An example for how I like to setup my React contexts to make them super easy to consume
// the provider component (I usually have a folder called 'contexts')
import React, { useState, useEffect, createContext } from 'react'
export const FancyContext = createContext({ fancyThing: null, setFancyThing: () => {} })
export function FancyProvider({ children }) {
const [fancy, setFancy] = useState({})
useEffect(() => {
// get the data you want, however you want (this is pseudocode)
@mercedesb
mercedesb / History|-13594cab|entries.json
Last active May 17, 2023 13:50
My Personal VSCode Settings
{"version":1,"resource":"file:///Users/mercedesbernard/Git/convertkit/config/database.yml","entries":[{"id":"yZVd.yml","timestamp":1681328147029},{"id":"vIiP.yml","timestamp":1681328703389},{"id":"akt6.yml","timestamp":1681747112000}]}
using EPiServer.Core;
using EPiServer.Shell;
using EPiServer.Shell.Services.Rest;
using SampleEditors.Models.Media;
using System;
using System.Collections.Generic;
namespace SampleEditors.Models.UIDescriptors
{
[UIDescriptorRegistration]