how can i resolve this error? Violation: View config getter callback for component `path` must be a function

Viewed 284

native with ant-design and styled-component

import styled from 'styled-components/native'
import { HeartOutlined } from '@ant-design/icons'

const Container = styled.View``

const Hi = styled.Text``

const Explain = () => {
  const Like = () => {
    console.log('like')
  }
  return (
    <Container>
      <HeartOutlined key="heart" onPress={Like} />
      <Hi>안녕</Hi>
    </Container>
  )
}

export default Explain

if i use this code it doesn't work as far as i know it works react.js

is there any way i can use styled-components with antd design in react-native

when i tried my code this error occure

Violation: View config getter callback for component path must be a function (received undefined). Make sure to start component names with a capital letter.

[![enter image description here][1]][1]

Please suggest. How can i solve this problem

0 Answers
Related