score:2
Accepted answer
the render function is just like a regular render, so you can add two times your component
<Router>
<Route
path="/economie"
render={props => (
<React.Fragment>
<Line_json
{...props}
senseAction={"ispositif"}
<Line_json
{...props}
senseAction={"isnegatif "}
></Line_json>
</React.Fragment>
)
)}
/>
</Router>
Given you need always one root parent for your components, you must add a <React.Fragment>
score:2
You can render it in a Fragment:
render={props => (
<>
<Line_json
{...props}
senseAction="ispositif"
/>
<Line_json
{...props}
senseAction="dsgdsg"
/>
</>
))}
Or an array with unique keys:
render={props => ([
<Line_json
{...props}
key="ispositif"
senseAction="ispositif"
/>
<Line_json
{...props}
key="dsgdsg"
senseAction="dsgdsg"
/>
</>
])}
Source: stackoverflow.com
Related Query
- With React Router : How to render a component multiple times with differents props each time in a Route?
- React Router v6 : How to render multiple component inside and outside a div with the same path
- How to render a React component multiple times but each time with an updated State?
- Multiple times render in react functional component with hooks
- How to 1). put a div , 2). render a component without Route inside <Routes> with React Router in v6 React?
- Render Same Component With Multiple Paths React Router Dom
- How to render a div component multiple times with different background color and text in React?
- How to render different component with react router after user logged in
- react router render component multiple times when refreshing
- How to render multiple component which parent are wrapped into another multiple element in react router v6
- How to render multiple times with React useState
- How to render a component multiple times in react
- React component render is called multiple times when pushing new URL
- How to pass the match when using render in Route component from react router (v4)
- onEnter Transitions with React Router and Redux Simple Router Dont Render New Route's Component
- React Router V4: How to render a modal in the same screen changing only the url and then with that url, be able to rebuild the whole screen
- Generic React TypeScript component with 'as' prop (able to render any valid dom node)
- How to load child component with props on first render with React Hooks
- issue with how to render with react router
- How to render a React component styled with Emotion in an iframe in Gatsby site?
- Rendering a component multiple times with different props in React
- How to communicate from Child Component to Parent Component with React Router
- How to fix Type not assignable to LibraryManagedAttributes for react router render prop
- React functional component execute multiple times, with useSelector() is executed multiple times in each function component execution
- React - how to render multiple buttons with a regular for loop?
- Force remount component when click on the same react router Link multiple times
- How can I add multiple path for home page with react router dom 6?
- How to use React Router to replace a Component in render method?
- How to call onEnter function on Route in React Router Multiple times
- React Render prop with Children in a functional component with useState Hook
More Query from same tag
- state destructuring trouble in redux
- How can I only allow certain components to scroll and keep certain React components fixed?
- Get location path from use Location hook inside a column renderer from react-bootstrap-table2
- Flashing screen when changing route with Reactjs
- Checkbox based on array in React: controlled vs uncontrolled component
- How to filter a table using multiple user inputs on a React.js app
- Multiple React-Router Redirects Fall Through without Redirecting on Time
- How to unit test reactjs component?
- Adding a timeout to a render function in ReactJS
- React: Toggle function in child component not working as expected
- Child component holding on to old prop value despite being passed an updated one
- Adding a line break dynamically inside a JSX expression
- How to update the state of single items in a list of array without updating every list in the array in ReactJs
- Argument of type 'FC<ComponentType>' is not assignable to parameter of type 'ForwardRefRenderFunction<unknown, ComponentType>'
- convert from React component to using one hooks
- How to re-render component with react hooks
- Why isn't useContext updating my value when imported in ReactJS?
- percentage height to child inside of parent element with view port height does not work
- How do I render the selected value just below the select control?
- unable to get previous date using moment.js
- How can I check if an object has an empty value on a key?
- How can I render multiple components interpolating JSX?
- Update Immutable List with only new data that doesn't match prior nested keys?
- React js - data.map is not a function
- Is there way to click multiple checkboxes when a option(check box) is on and when it is off you can only select one at a time?
- Redux: Waiting for state changes before doing something else
- How to change the background color of the input in NextUI
- Date in javascript isn't correct
- Two way communication flutter webview and reactjs website
- Handle onChange in a ReactJs application