Interacting with SharePoint lists is the most common SPFx task. Here’s how to do it properly with PnP JS. Setup PnP JS Read Items Create Item Update Item Delete Item References PnP JS Documentation
Read more โMonth: July 2019
Entity Framework Core Migrations: Managing Schema Changes
EF Core migrations track database schema changes alongside your code. Here’s how to use them effectively. Basic Commands Migration File Best Practices Always review generated migrations Test Down() methods Use SQL scripts for production Consider data migrations separately References EF Core Migrations
Read more โReact Custom Hooks: Extracting Component Logic
Custom hooks let you extract and reuse stateful logic. They’re one of the best features of React Hooks. Creating a Custom Hook useFetch Hook Rules Name must start with “use” Can call other hooks Each use creates independent state References Building Your Own Hooks
Read more โReact useReducer: Complex State Logic Made Simple
useReducer is useState’s more powerful sibling. When state logic gets complex, useReducer brings predictability. Basic Usage With Context Combine useReducer with Context for app-wide state management – a simpler alternative to Redux: When to Use useReducer Multiple related state updates Next state depends on previous state Complex state objects Want Redux-like patterns without Redux
Read more โMediator Pattern in C#: Implementing with MediatR
MediatR implements the mediator pattern in .NET, decoupling request handling from the caller. It’s become my go-to for organizing application logic. Setup Request and Handler Using in Controller Benefits Decoupled handlers – easy to test Pipeline behaviors for cross-cutting concerns Clean controller actions References MediatR GitHub
Read more โMicrosoft Graph API: Working with Users and Groups
Graph API gives you access to Azure AD users and groups. Here are common operations you’ll need. Get Current User List Users Get User’s Groups Permissions Needed User.Read – Read own profile User.Read.All – Read all users GroupMember.Read.All – Read group memberships References Graph Users API
Read more โ