Component
OperationParade
Double, add seven and reverse the digits can each be used once. The live number changes after every step, and the final result depends on the order in which the same three operations were paraded.
Possible use
It could make a reviewer perform three arbitrary calculations on a handoff estimate, or let a presenter demonstrate that an agenda number changes when its ceremony changes. Both uses confuse order sensitivity with policy.
Reasonable alternative
A reasonable local alternative is one explicit expression or a named calculation function. A public parade makes arithmetic depend on audience choreography.
01 / Preview
Try it yourself.
Started at 2424The next operation is your responsibility.
- No operation has marched yet.
Mechanism
- 1
- Choose one operation, then another, then the last.
- 2
- Watch the number change after every actual calculation.
- 3
- Restart and use a different order to reach a different answer.
02 / Usage
Put it somewhere.
example.tsxTSX
import { OperationParade } from "gra-ui";
import "gra-ui/styles.css";
export function ParadedValue() {
return <OperationParade value={24} />;
}03 / API
Small surface area.
PropTypeDescription
valuenumberThe starting number submitted to the order-dependent operation parade.