Skip to main content

Posts

Recent posts

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 }

TypeScript Fundamentals

TypeScript: TypeScript is a typed superset of JavaScript that compile to plain JavaScript. Topics: 1.       Getting Started with TS 2.       Typing, Variables & Functions 3.       Classes & Interfaces 4.       TypeScript Modules Why TypeScript? Before why we need to understand the problems with writing JavaScript code. 1.       JavaScript is messier with un-maintained code. 2.       Enterprise-code is very complex and difficult to use proper types. 3.       Difficult to work on 1000’s lines of JavaScript code. 4.       Create variables as integers and below of the code it can be used as string in JavaScript. To avoid these kind of JavaScript issues, TypeScript is introduced. Is there any TypeScript Alternatives? 1.       DART (By Google) 2.       CoffeeScript 3.       eCma Script TypeScript Features: TypeScript works with  1.       Any Browser 2.       Any Host 3.       Any Os 4.       Open Source 5.       Tool Su

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