Getting Started with React SPFx CRUD & Search WebPart

This blog explains how you can clone my GitHub repository, install dependencies, and run the SPFx React web part for:

✅ CRUD operations on SharePoint list items
✅ Searching list items
✅ Selecting list name from the property pane

👉 GitHub Repo: ReactSPFx

📌 Step 1 – Prerequisites

Before you start, make sure you have:

  • Office 365 / M365 tenant with SharePoint Online

  • Node.js (LTS) compatible with SPFx version in the project

  • npm (comes with Node.js)

  • Yeoman and gulp installed globally

  • Access to App Catalog if you want to deploy

📌 Step 2 – Clone Repository

Open your terminal and run:

install git to run below command

  • git clone https://github.com/sunilshetty07/ReactSPFx.git 
  • cd ReactSPFx


📌 Step 3 – Install Dependencies

Run the following inside the folder:

  • npm install

This installs React, SPFx controls, PnP libraries, Fluent UI, etc.

📌 Step 4 – Run in Local Workbench

Start the local dev server:

  • gulp serve

Now open the SharePoint Workbench:

  • Local: https://localhost:4321/temp/workbench.html

  • Online: https://<your-tenant>.sharepoint.com/sites/<yoursite>/_layouts/15/workbench.aspx



📌 Step 5 – Configure Property Pane

  1. Add the webpart to the page.

  2. Open the Property Pane.

  3. Select a List Name from the dropdown.

  4. Now you can perform CRUD operations and search items.





📌 Step 6 – Package & Deploy (Optional)

When ready to deploy:

  • gulp bundle --ship
  • gulp package-solution --ship

This will create a .sppkg file inside:

sharepoint/solution

Upload this file to the App Catalog and deploy.



Go to any site page, edit the page, add the webpart, update the Property Pane settings as needed, and then republish the page to see it in action.

Quick Commands Recap

git clone https://github.com/sunilshetty07/ReactSPFx.git

cd ReactSPFx

npm install

gulp serve

# For deployment

gulp bundle --ship

gulp package-solution --ship

🎯 Conclusion

That’s it! 🎉 You now have a working React SPFx WebPart with CRUD, search, and property pane list selection.

👉 Try cloning the repo here: ReactSPFx GitHub

Comments

Popular posts from this blog

Step-by-Step Guide: Power Automate Custom Connector Using Graph API from Azure App Service

Calling Microsoft Graph API from Power Automate Using Azure App Services – Step-by-Step Guide

Step-by-Step: Give Unique Permissions to OneDrive Files Using Power Automate and Graph API (No Premium License Needed)