examples/nutshell/src/index.js
function ErrorMessage({ state, error, clearError }) {
  return (
    <>
      <h1 style={{ color: "red" }}>{error.message}</h1>
      <button onClick={() => clearError()}>Try Again</button>
      <pre>{JSON.stringify(state, null, 2)}</pre>
    </>
  )
}
function ErrorMessage({ state, error, clearError }) {
  return (
    <>
      <h1 style={{ color: "red" }}>{error.message}</h1>
      <button onClick={() => clearError()}>Try Again</button>
      <pre>{JSON.stringify(state, null, 2)}</pre>
    </>
  )
}
function ErrorMessage ( { state , error , clearError } ) { return ( < > < h1 style = { { color : "red" } } > { error . message } < / h1 > < button onClick = { ( ) => clearError ( ) } > Try Again < / button > < pre > { JSON . stringify ( state , null , 2 ) } < / pre > < / > ) }
a component for displaying an error message
a component for displaying an error message