How to use HTML entities without dangerouslySetInnerHTML in React

How to use HTML entities without dangerouslySetInnerHTML in React

There may be times when you will want to render a string with HTML entities in it in your React application. An HTML entity is a piece of text (string) that begins with an ampersand (&) and ends with a semicolon (;). They are frequently used to display reserved and invisible characters, like non-breaking spaces ( ) or soft hyphens (​) for marking line breaking opportunities.

To render these characters, you need to use dangerouslySetInnerHTML:

function createMarkup(myTextFromDatabase) {
  return {__html: myTextFromDatabase};
}

function MyComponent({myTextFromDatabase}) {
  return <div dangerouslySetInnerHTML={createMarkup(myTextFromDatabase)} />;
}

const myTextFromDatabase = 'First &middot; Second';
<MyComponent myTextFromDatabase={myTextFromDatabase />}

read more

Building the Boeing 777 Documentary (21st Century Jet)

Building the Boeing 777 Documentary (21st Century Jet)

If you are into Lean manufacturing and product development, you should watch this beautiful documentary about the development and manufacturing of the Boeing 777 aircraft from 1996. It took 5 years and 5 billion dollars to build it from scratch. Ten thousand people worked on it together under Alan Mulally.

Mulally created an entirely new management system for the Boeing 777 program. He focused his energies on Working Together: design/build teams were created with members from design, manufacturing, suppliers, and customer airlines. There were no secrets in the teams, everyone was urged “share early and share often”.

The management system was based on W. Edwards Deming’s playbook and 14 Points.

The documentary has 5 episodes, each around one hour long.

read more