Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vccoffey opened this issue Jul 19, 2024 · 0 comments
Open

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

vccoffey opened this issue Jul 19, 2024 · 0 comments

Comments

@vccoffey
Copy link

vccoffey commented Jul 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant