React #

Source file extensions: .js|.jsx|.ts|.tsx

React is supported in both JavaScript and Typescript.

JSX can also be used.

Component #

Greeting.tsx

export function getGreeting(user) {
  if (user) {
    return <h1>Hello, {formatName(user)}!</h1>;
  }
  return <h1>Hello, Stranger.</h1>;
}

Stories #

React JSX can be used in stories with file extensions .stories.jsx or .stories.tsx.

import MyCounter from './index.js';

export const story1 = () => <MyCounter></MyCounter>;

Documentation #

See MDX.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.