diff --git a/content/docs/tutorial/dynamic-enum.mdx b/content/docs/tutorial/dynamic-enum.mdx index b53ccd72..88b3f2a5 100644 --- a/content/docs/tutorial/dynamic-enum.mdx +++ b/content/docs/tutorial/dynamic-enum.mdx @@ -68,7 +68,7 @@ const url = schema['x-url']; #### Initializing the React Context Now that we have access to the API URL, we can use React Context to make this data available across our renderers. -React Context allows you to share data globally within your application, enabling components deep in the component tree to access data without needing to pass properties through all parent elements. +React Context allows you to share data deep in the component tree to access data without needing to pass additional properties through the component hierarchy. To set up the React Context for your API service, create it in your application as follows: ```js @@ -90,7 +90,7 @@ Access the API service using the context: const api = React.useContext(APIContext); ``` -Changing the context's value will trigger a re-render of components that use it, making it a powerful tool for managing dynamic data. +Changing the context's value will trigger a re-render of components that use it. ### The Country Renderer @@ -157,7 +157,7 @@ type JsonSchemaWithDependenciesAndEndpoint = JsonSchema & { endpoint: string; }; -export const Country = ( +const CountryControl = ( props: ControlProps & OwnPropsOfEnum & WithOptionLabel & TranslateProps ) => { const { handleChange } = props; @@ -255,5 +255,4 @@ export const Region = ( ); }; ``` -Again we need to create a [create a tester](./custom-renderers#2-create-a-tester) and [register](./custom-renderers#3-register-the-renderer) the new custom renderer. -A running example of the scenario can also be seen at the [react-seed](https://github.com/eclipsesource/jsonforms-react-seed) app. \ No newline at end of file +Again we need to create a [create a tester](./custom-renderers#2-create-a-tester) and [register](./custom-renderers#3-register-the-renderer) the new custom renderer. \ No newline at end of file