Cuong Ta Cuong Ta - 7 months ago 71
React JSX Question

React - Deal with HTML inner of a component tag

I have a code to run app like this:

import React from 'react'
import { render } from 'react-dom'
import AComponent from './components/AComponent'

<span id="needShow">HTML inner Component Tag</span>

And this is component code:

import React from 'react'
const AComponent = () => (
<span> Hello of AComponent</span>

export default AComponent

How can I show span_id=needShow? I search Google but don't see necessary information


Child components are passed to a component via the children prop:

const AComponent = (props) => (