This is a roadmap for learning React.
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
[Theory] | |
[InlineData($InlineData$)] | |
public async Task Should$DoSomething$When$Condition$($type$ $name$) | |
{ | |
$END$ | |
} |
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
[Theory] | |
[InlineData($InlineData$)] | |
public void Should$DoSomething$When$Condition$($type$ $name$) | |
{ | |
$END$ | |
} |
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
[Fact] | |
public async Task $MethodUnderTest$Should$DoSomething$When$Condition$() | |
{ | |
$END$ | |
} |
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
[Fact] | |
public void $MethodUnderTest$Should$DoSomething$When$Condition$() | |
{ | |
$END$ | |
} |
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
// In our child component | |
<input value="@Value" oninput="@OnValueChanged" /> | |
@code { | |
[Parameter] | |
public decimal Value { get; set; } | |
[Parameter] | |
public EventCallback<decimal> ValueChanged { get; set; } |
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
@page "/" | |
<input @bind="SearchTerm" @bind:event="oninput" /> | |
<span class="text-muted ml-5"> | |
Showing @FilteredToDos.Count out of @ToDoItems.Count | |
</span> | |
<h4 class="mt-4">To Do's</h4> | |
<ul> |
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
using System.Collections.Generic; | |
using Microsoft.AspNetCore.Mvc.Razor; | |
namespace FeatureFolderStructureDemo.StartupCustomizations | |
{ | |
public class FeatureLocationExpander : IViewLocationExpander | |
{ | |
public void PopulateValues(ViewLocationExpanderContext context) | |
{ | |
// Don't need anything here, but required by the interface |
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
# create new PR and open it | |
function pr() { | |
github_url=`git remote -v | awk '/fetch/{print $2}' | sed -Ee 's#(git@|git://)#https://#' -e 's@com:@com/@' -e 's%\.git$%%' | awk '/github/'`; | |
branch_name=`git symbolic-ref HEAD | cut -d"/" -f 3,4`; | |
main_branch=`git symbolic-ref refs/remotes/origin/HEAD | cut -d'/' -f4` | |
open_or_start='open' | |
uname=$(uname) | |
if [[ "$uname" == CYGWIN* || "$uname" == MINGW* ]] ; then | |
open_or_start='start' | |
fi |
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"; | |
import { screen, render, fireEvent } from "@testing-library/react"; | |
import InputField from "./InputField"; | |
import { Formik } from "formik"; | |
test("should have validation error given input field is touched and error exists on form", async () => { | |
const fieldName = "firstName"; | |
const labelName = "First Name"; | |
render( | |
<Formik |
NewerOlder