A checklist for learning React - Fork it and start ticking off topics!
- use-cases of React
- JavaScript basics for React
- immutability / data management without mutations
- updating properties of objects
// https://gist.github.com/kottenator/9d936eb3e4e3c3e02598 | |
public static int[] Pagination(int current, int last) | |
{ | |
int delta = 2; | |
int left = current - delta; | |
int right = current + delta + 1; | |
var range = new List<int>(); | |
var rangeWithDots = new List<int>(); | |
int? l = null; |
// https://gist.github.com/kottenator/9d936eb3e4e3c3e02598 | |
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], |
public class HomeController : Controller | |
{ | |
public async Task<string> RenderViewComponent(string viewComponent, object args) | |
{ | |
var sp = HttpContext.RequestServices; | |
var helper = new DefaultViewComponentHelper( | |
sp.GetRequiredService<IViewComponentDescriptorCollectionProvider>(), | |
HtmlEncoder.Default, | |
sp.GetRequiredService<IViewComponentSelector>(), |