Sample code for Azure AD B2C & React JS. This is using default React JS template, with Azure AD B2C. Full technical description can be found in my Medium Blog: Azure AD B2C Quick Start for React JS Single Page Apps (SPA).
Assuming that you already have the necessary Azure AD B2C parameters, you can modify authConfig.js, replace the parameter inside with your own value and the app should run with your Azure AD B2C.