ttag
ttag copied to clipboard
feat: update jt to add keys to react elements
Addresses https://github.com/ttag-org/ttag/issues/166.
Adds an optional peer dependency on react and uses isValidElement and cloneElement to add keys to jt expressions that are React elements and do not already have a key defined.
Chose to bump the major version because this would be a breaking change for current users of jt who did not previously have react as a dependency.
Now you can safely use jt with JSX expressions without manually adding a key prop (which is an uncommon pattern when defining JSX outside of .map).