Skip to main content

Modern script editor WebPart (Run Script when element available in the page)

Comments

Popular posts from this blog

Difference between React State and Props

Before jumping to state vs props we have to compare a React component with a javascript plain function. Let me define a React component & a plain javascript function side by side. class DummyComponent extends React.Component { render () { return <div>Hey</div> } } const DummyFunction = () => console.log('Hey') We defined a React component named  DummyComponent  and returned a  div containing text  Hey  similarly, we defined a function named  DummyFunction and output  Hey  to the console. Isn’t they look a lot similar ? they both generate the same output write  Hey  to the output the only difference between the two is the React component going to render a div with text  Hey where the function going to output  Hey  on the console. So we now Know that React components are very similar to Plain Javascript functions. Let’s take a look at  State . React Component State A state in React Component is its own local state, the state cannot be

Hide Title Section in Modern pages

 Open Windows PowerShell and run below command 1. For single page $PageName = "Home" $LoginUrl = "https://parentsite-url/sites/sub-site-url/" Connect-PnPOnline -Url $LoginUrl -UseWebLogin Set-PnPClientSidePage -Identity $PageName -LayoutType Home   2. For All the site pages $LoginUrl = "https://parentsite-url/sites/sub-site-url/" Connect-PnPOnline -Url $LoginUrl -UseWebLogin $pages = (Get-PnPListItem -List SitePages).FieldValues foreach($page in $pages){     Set-PnPClientSidePage -Identity $page.FileLeafRef -LayoutType Home }