If I am on a site collection and the homepage isn't "Home.aspx", how can I check which one is it using react SPFX framework?
You could use pnp library to get the welcome page.
pnp.sp.web.get().then(web=>{
console.log(web.WelcomPage);
})
This combination worked for me:
pnp.setup({
spfxContext: this.props.context
});
let welcomePage = await pnp.sp.web.get().then(web=>{
return web.WelcomePage;
})
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.