- React Update State
How to update state of an object We have a user object setUser({ …user, name: “Peter” }); How to update state of list/array of objects We have a shopping cart which contains a list of menu items const [shopCart, setShopCart] = useState([{ name: “”, price: 0, uuid: “” }]); add item to shopping cart…
- HTML Doctypes
A DOCTYPE is an instruction to the web browser about the version of HTML in which the web page is written. A DOCTYPE declaration appears at the top of a web page before all other elements. According to the HTML specification or standards, every HTML document requires a valid document type…
- Spring Boot – OAuth2
Create auth server and resource server Create auth client that consumes resource from a third party like Google or Github
- Git log
Shows commit logs. git log is intended for creating release announcements. It groups each commit by author and displays the first line of each commit message. This is an easy way to see who’s been working on what. git log Show insertions and deletions to each file The –stat option displays the…
- CSS Applying CSS
There are three methods of applying CSS to a document. Inline Inline styles are CSS declarations that affect a single HTML element, contained within a style attribute. Avoid using CSS in this way, when possible. It is the opposite of a best practice. First, it is the least efficient implementation…