# JsonFormsDispatch seems not to be working on embedded layouts (React Native)

**URL:** <https://jsonforms.discourse.group/t/jsonformsdispatch-seems-not-to-be-working-on-embedded-layouts-react-native/1229>\
**Category:** General\
**Created:** [January 12, 2023, 7:00pm UTC](https://jsonforms.discourse.group/t/jsonformsdispatch-seems-not-to-be-working-on-embedded-layouts-react-native/1229 "2023-01-12T19:00:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leo](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@leo](https://jsonforms.discourse.group/u/leo)\
**Post date:** [January 12, 2023, 7:00pm UTC](https://jsonforms.discourse.group/t/jsonformsdispatch-seems-not-to-be-working-on-embedded-layouts-react-native/1229/1 "2023-01-12T19:00:11Z")

</div>

Hi! I have a custom implementation of JsonForms for React Native. I’ve been creating renderers and added functionality to render forms. That is working well! I want to have multi-layouts support. So I created custom vertical and group layouts. They work well along. When I tried to combine those (group layouts inside a vertical layout) the renderers are not being rendering. Seems like something is happening with JsonFormsDispatch.

So this is my **VerticalLayout:**

```auto
<JsonFormsLayout
      uischema={uischema}
      schema={schema}
      visible={visible}
      enabled={enabled}
      path={path}
      orientation="vertical"
    >
      <ChildrenRenderer schema={schema} path={path} layout={verticalLayout} />
    </JsonFormsLayout>

```

**JsonFormsLayout:**

```auto
 <ScrollView
      style={{
        flex: 1,
        flexDirection,
      }}
    >
      {/* eslint-disable-next-line react/destructuring-assignment */}
      {props.children}
    </ScrollView>

```

**ChildrenRenderer**

```auto
<View style={{ flex: 1, flexDirection: 'column' }}>
    {(layout.elements || []).map((child: any, index: number) => (
      <View style={{ flex: 1, flexDirection: 'column' }}>
        <JsonFormsDispatch
        /* eslint-disable-next-line react/no-array-index-key */
          key={`${path}-${index}`}
          uischema={child}
          schema={schema}
          path={path}
          visible
        />
      </View>
    ))}
  </View>

```

Basically group layout is based on vertical layout but it adds a label as a title.

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [January 17, 2023, 4:34pm UTC](https://jsonforms.discourse.group/t/jsonformsdispatch-seems-not-to-be-working-on-embedded-layouts-react-native/1229/2 "2023-01-17T16:34:47Z")

</div>

Hi @leo,

On the first glance it mostly looks fine, however as you did not post all the code I can’t really understand the whole flow.

What seems weird to me:

- Why does `JsonFormsLayout` receive `uischema`, `schema` etc.? Does it actually do something with them?
- In your VerticalLayout you seem to have `uischema` and `verticalLayout` variables. What is the difference between them and how are they determined?
- Did you check whether there are any `layout.elements` to iterate over? If you actually dispatch, do you check which renderers where actually invoked?

---

<div class="post-metadata">

**Author:** ![leo](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@leo](https://jsonforms.discourse.group/u/leo)\
**Post date:** [March 3, 2023, 1:46am UTC](https://jsonforms.discourse.group/t/jsonformsdispatch-seems-not-to-be-working-on-embedded-layouts-react-native/1229/3 "2023-03-03T01:46:52Z")

</div>

- Why does `JsonFormsLayout` receive `uischema`, `schema` etc.? Does it actually do something with them?

Actually is not doing something with it, that means I can remove it.

- Did you check whether there are any `layout.elements` to iterate over? If you actually dispatch, do you check which renderers were actually invoked?

I’ll try to find out if contains elements, it should but I’m going to make sure.
