From 555cb98dbd552342972d87ece3a69e36ce8248b0 Mon Sep 17 00:00:00 2001 From: Konrad Bosak Date: Fri, 8 Mar 2024 10:56:45 +0100 Subject: [PATCH] Rephrase the AutoField algorithm docs (#1308) --- docs/uth-autofield-algorithm.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/uth-autofield-algorithm.md b/docs/uth-autofield-algorithm.md index 158bea9d0..8e14e70a0 100644 --- a/docs/uth-autofield-algorithm.md +++ b/docs/uth-autofield-algorithm.md @@ -46,7 +46,7 @@ const AutoField = createAutoField(props => { ## Overriding `AutoField` -To make it possible, all `AutoFields` created with the `createAutoField` are configurable. To adjust the components, use the React context available in `AutoField.componentDetectorContext`. You can use it as often as needed - in most apps once will be enough. Example: +If you want to alter the default behavior of `AutoField` and render a different component based on the props, you can do it using the React context available in `AutoField.componentDetectorContext`. You can use it as often as needed - once will be enough in most apps. Example: ```tsx /* ... */}> @@ -54,7 +54,7 @@ To make it possible, all `AutoFields` created with the `createAutoField` are con ``` -If you want to add an exception and then fallback to the existing algorithm, use `AutoField.defaultComponentDetector`. Example: +If you want to change the detector only partially, i.e., to render one additional field, and in other cases, use the default algorithm as a fallback, return `AutoField.defaultComponentDetector`. Example: ```tsx