Skip to content

Instantly share code, notes, and snippets.

@TimothyDJewell
TimothyDJewell / SolutionAnalyzer.linq
Last active August 10, 2023 14:19
Load basic information about a .NET solution file
<Query Kind="Program">
<NuGetReference>Microsoft.Build</NuGetReference>
<NuGetReference>Microsoft.Build.Utilities.Core</NuGetReference>
</Query>
void Main()
{
ExtractProjectData(@"Path\To\Solution\File.sln").Dump();
}
@TimothyDJewell
TimothyDJewell / notes.md
Last active July 11, 2023 00:17
React reducer context provider

While reading through scaling up with reducer and context from the react docs, the docs took the user through a series of steps to transfer reading state and dispatch from the props to the context, resulting in set of abstractions like:

const TasksContext = createContext(null);

const TasksDispatchContext = createContext(null);

export function TasksProvider({ children }) {
 const [tasks, dispatch] = useReducer(