why is this a React hook?
this is a simplified version of the production/real world version
You can consume roles from context/redux/relay or other place to improve dx and void bugs
| export const chaosTestStrings = (): void => { | |
| const textNodes = getAllTextNodes(document.body); | |
| for (const node of textNodes) { | |
| const textNodeLength = node.textContent ? node.textContent.length : 0; | |
| if (node.textContent === null) { | |
| return; | |
| } | |
| if (node.parentElement instanceof Element) { | |
| if (node.parentElement.dataset.originalText === undefined) { |
| export const floatToCents = (value: number): number => { | |
| return parseInt((value * 100).toFixed(2), 10); | |
| } |
why is this a React hook?
this is a simplified version of the production/real world version
You can consume roles from context/redux/relay or other place to improve dx and void bugs