I want the button to be dynamically created and used when the onPress event occurs. Ask for help from great and kind friends.
I want{ in screen one Button , -> Button click -> create one Button -> so we have two button }
it is my code
import React, { Component } from 'react'import { Button } from 'react-native'const Test = () => { return( <Button title='test' onPress={<Button title='test1'/>}/> ) } export default Test
or
import React, { Component } from 'react'import { Button } from 'react-native'const Test = () => { return( <Button title='test' onPress={ButtonRender}/> ) }const ButtonRender =():any=>{ return <Button title='test1'/>}export default Test
I have a problem. It is not created Button. I need help