score:3
Accepted answer
You should not invoke your components directly, but pass them into createElement
function:
return (
<td>
{createElement(component, {
...field.props,
checked: entry[field.props.checked],
entry: entry,
})}
</td>
);
You can also use JSX here, but with JSX you will have to name your component
property with capital letter, so transformation would not confuse it with html or custom element.
Source: stackoverflow.com
Related Query
- What does forwardRef by a component in React dev tools mean and how can I use it?
- React useImperativeHandle and forwardRef being set, the reference doesn't seem to be updated
- React forwardRef - access ref within component, and in parent
- React Parsing string as html and applying a function to DOM with forwardRef
- React and forwardRef
- React UseRef and forwardRef issue for an element position
- React + Typescript referencing select element using useRef and forwardRef
- How to extend a ref type for forwardRef in react and typescript to allow multiple refs
- What is the difference between React Native and React?
- What's the difference between "super()" and "super(props)" in React when using es6 classes?
- TypeScript and React - children type?
- How to compare oldValues and newValues on React Hooks useEffect?
- React : difference between <Route exact path="/" /> and <Route path="/" />
- Concatenating variables and strings in React
- What are React controlled components and uncontrolled components?
- React functional stateless component, PureComponent, Component; what are the differences and when should we use what?
- React hooks - right way to clear timeouts and intervals
- How to detect Esc Key Press in React and how to handle it
- Difference between component and container in react redux
- How to import and export components using React + ES6 + webpack?
- React - animate mount and unmount of a single component
- How to render react components by using map and join?
- When should you use render and shallow in Enzyme / React tests?
- How to test a className with the Jest and React testing library
- React / Redux and Multilingual (Internationalization) Apps - Architecture
- How to store Configuration file and read it using React
- Difference between React Component and React Element
- "React.Children.only expected to receive a single React element child" error when putting <Image> and <TouchableHighlight> in a <View>
- What's the difference between hydrate() and render() in React 16?
- Add Favicon with React and Webpack
More Query from same tag
- Webpack loading SVG with white border
- State not updating in Component
- Issues with scope and OOP in ReactJS
- How to search nested object by following JSLint
- Preventing user to access login or signup page if logged in, Firebase auth in React
- react.js get child value in parent component
- When should I use Lists vs Menus in Material-UI?
- React ES6 Error: Invariant Violation: CampaignMobile.render()
- React-Select trigger onChange when value changes
- Can't import Svg icons in material-ui@next
- How can I set conditional class on the selected element in react, toggle will not work
- Code Coverage on React with Puppeteer + Istanbul
- React Yup schema
- React Reflux error when running compiled JSX but not when using transformer
- Nested sort in GraphQL
- how to avoid whitespace on right side if columns are less in Ag grid
- Custom back navigation for reactnavigation back button
- how can i add input value to state in React.js?
- Material-UI Next js Link Button
- Force scroll down to a particular point after some user scrolling [React]
- React-router, JWT Cookie, Flux, Authentification & SSR
- "object Object" showing as input value with Formik forms on ReactJS
- Save object to array in another model
- Antd dropdown menu error when hovering over menu items
- mapping some images with out key and value pair in react
- How to reach moment timestamp lines in a function
- Fetch and filter Images in array by field value width
- How can I make sure only 1 panel is open/expanded at a time?
- Reactjs : How I can change button style when clicked
- How to save Multiple form on one request in React?