Welcome to the My Learning Docs ๐Ÿ‘‹ and I'm at the starting phase of Documentaion and Learning to do it so.
Trial
Demopageworks
Callo2

Overview

ES2015 introduced built-in JavaScript modules. A module is a file containing JavaScript code and makes it easy to expose and hide certain values.

The module pattern is a great way to split a larger file into multiple smaller, reusable pieces. It also promotes code encapsulation, since the values within modules are kept private inside the module by default, and cannot be modified. Only the values that are explicitly exported with the export keyword are accessible to other files.

video

Overview

Higher-Order Components (HOC) make it easy to pass logic to components by wrapping them.

For example, if we wanted to easily change the styles of a text by making the font larger and the font weight bolder, we could create two Higher-Order Components:

  • withLargeFontSize, which appends the font-size: "90px" field to the style attribute.
  • withBoldFontWeight, which appends the font-weight: "bold" field to the style attribute.

Web Vitals

To measure how well our website performs, we can use a set of useful measurements called Web Vitals. A subset of these measurements - the Core Web Vitals - is usually used to determine the performance of a page, and can affect your website's SEO.

Challenge

Refactor the following code so that TemperatureConverter uses the renderKelvin and renderFahrenheit props to render the <Kelvin /> and <Fahrenheit /> components.

stackblitz using iframe 1

stackblitz using iframe 2

stackblitz using component typescript

Follow Up & References

Credit

https://javascriptpatterns.vercel.app/patterns (opens in a new tab)

https://github.com/lydiahallie/javascript-react-patterns/blob/4ec96d8a6afaa1a8cd1b805cbbeee490f32623b1/components/Features.tsx (opens in a new tab)

https://github.com/lydiahallie/javascript-react-patterns/blob/main/components/Features.tsx (opens in a new tab)

https://javascriptpatterns.vercel.app/patterns/rendering-patterns/introduction (opens in a new tab)

https://github.com/lydiahallie/javascript-react-patterns/blob/main/pages/patterns/rendering-patterns/introduction.mdx?plain=1 (opens in a new tab)

https://github.com/lydiahallie/javascript-react-patterns/blob/main/pages/patterns/rendering-patterns/introduction.mdx?plain=1 (opens in a new tab)


..Refresh the Page to Load New Comments and it differs from each page..