score:1
Accepted answer
your recommendations react component's render function doesn't have any return statement. try doing this:
var recommendations = react.createclass({
render: function() {
return ( <div id="bizdata">
<div id='namelist'>{this.props.item.name}</div>
<div id='phonelist'>{this.props.item.phone}</div>
<div id='ratinglist'>{this.props.item.rating}</div>
</div>);
}
});
also add a key to the recommendations components as @vikramaditya recommends:
recsloop.push(<recommendations key={i} item={this.props.recommendations[i]} />)
Source: stackoverflow.com
Related Query
- react components not talking to each other
- Components overlapping each other in React
- How should child components in React communicate between each other in a clean and maintainable fashion?
- Render two components adjacent to each other in React
- React HOC working on some but not other components
- React Mobx - Change store from other store not render observer components
- Can two React distinct and mounted components communicate with each other using props?
- I just used react context, why does static context not work if I console on other components
- React makeStyle is not working properly and causes other components to disappear
- How do I configure a React router to load two components on top of each other (Overlay)?
- React bootstrap not styling my react components
- Using 'ref' on React Styled Components is not working
- React + Redux, How to render not after each dispatch, but after several?
- Align next to each other in <View/> react native
- require css in React component affects other components too
- How to use react components from other files
- React styled-components: refer to other components
- Components not re-rendering on route change - React HashRouter
- Media queries not working with styled components in React App
- React Router v4 not rendering components
- Unsafe legacy lifecycles will not be called for components using new component APIs. React v16.3
- React lazy components not loaded on dynamic routes
- React Day Picker calendar overlay pops up behind other components
- Module not found error using Yarn 2 to link React components
- React Components from Separate App not integrating into Main App
- My first sample table using react-data-grid, columns are not rendered next to each other, instead they are overlapping over and over each other
- npm run build does not update the react components
- what is proper way to import multiple components from same file in react instead of getting each component imported
- svg not rendering correctly when used with by multiple react components
- Map of React Components not re rendering on State Change
More Query from same tag
- How to use react to listen a loop events with contract?
- How to integrate azure b2c with react
- Adding/Removing animation classes with react + redux
- Why debounce doesnt invoke my function?
- graphene mutation returns 400 - won't pass id field properly
- React js with browserify and bootstrap raising error
- Add HTML property conditionally in React
- Render a react component n times
- TypeError: Cannot destructure property 'reflectionId' of 'undefined' as it is undefined
- Material-ui response to breaking change in React 15.4.0? "Cannot resolve module 'react/lib/EventPluginHub'"
- How to mock a constructor used in React componentWillUnmount
- How to setstate after fetch data React hook
- Getting 404 (Not found) error using axios in a redux action creator, to make api calls to an expressJs backend
- when the characters in the text box is more than 3 i need to add border
- Connecting Redux to my app at the top level doesn't work
- Yup / Formik validation using dynamic keys
- How not to refresh the page after onClick
- Why after I click the go back button, the cancel button doesn't work?
- React: following DRY in React when fetching data from API
- How to pass `component` into tab panel when active?
- React - useRef with TypeScript and functional component
- how can I change the layout of this material UI form?
- React prevent onClick firing when onFocus fires
- Socket.io and React: Proper way too receive data from server and set state in a component?
- Fetch data request to nested JSON object error - React/Next.JS
- radio inputs repeating on selection (React)
- react-transition-group card flip animation
- Problem to delete a row from a table with React
- add scroll listener by id
- DOM is always the App page in every other page React + Ionic + Typescript