Skip to content

Failing to render a <View> or <Pressable>  #221

Open
@vccoffey

Description

@vccoffey

I'm using a plugin to add a custom rule to add a shortcode <my-button title='something' ... /> and render a custom component in its place.

This works when I render a simple tag like this

  const myButtonRule: RenderRules['my_button'] = (
    node,
    _children,
    _parent,
    _styles
  ) => {
    const { href, variant, title } = node.attributes
    return <Text>TEST: {title}</Text> // This works
    return <View><Text>TEST</Text></View> // This does not work. Just renders a blank white space
  }
  
  const rules = { my_button: myButtonRule }

However, when I render a or , I just get a white space where the component should be.

I need to render a or to render the proper styles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions