![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
react-google-reviews
Advanced tools
A React component to easily display Google reviews using Google Places API or Google My Business API.
This React Google Reviews library is brought to you by Featurable, and the following documentation can also be found at https://featurable.com/docs/react-google-reviews
What is it? React component to display Google reviews on your website. This library is built with React and uses the Google Places API -or- the free Featurable API to fetch and display Google reviews on your website.
Documentation and examples at https://featurable.com/docs/react-google-reviews. Source code at https://github.com/ryanschiang/react-google-reviews.
Check out the live demo to see the React Google Reviews library in action.
Install it from npm:
npm install react-google-reviews
Prerequisites:
import { ReactGoogleReviews } from "react-google-reviews";
import "react-google-reviews/dist/index.css";
function Reviews() {
// Create a free Featurable account at https://featurable.com
// Then create a new Featurable widget and copy the widget ID
const featurableWidgetId = "842ncdd8-0f40-438d-9c...";
return (
<ReactGoogleReviews layout="carousel" featurableId={featurableWidgetId} />
);
}
Prerequisites:
import { ReactGoogleReviews, dangerouslyFetchPlaceReviews } from "react-google-reviews";
import "react-google-reviews/dist/index.css";
/**
* Example using NextJS server component
*/
async function ReviewsPage() {
const placeId = "ChIJN1t_tDeuEmsRU..."; // Google Place ID
const apiKey = "AIzaSyD..."; // Google API Key
// IMPORTANT: Only fetch reviews server-side to avoid exposing API key
const reviews = await dangerouslyFetchPlaceReviews(placeId, apiKey)
return (
// Carousel and other layouts require wrapping ReactGoogleReviews in a client component
<ReactGoogleReviews layout="badge" reviews={reviews} />
);
}
export default ReviewsPage;
[!NOTE] The Google Places API only returns the 5 most recent reviews. If you need more reviews or want to customize which reviews are returned, consider using the free Featurable API.
There are three layout options currently available:
<ReactGoogleReviews layout="badge" featurableId={featurableWidgetId} />
<ReactGoogleReviews layout="carousel" featurableId={featurableWidgetId} />
<ReactGoogleReviews layout="custom" featurableId={featurableWidgetId} renderer={(reviews) => {
return (
<div>
{reviews.map(({ reviewId, reviewer, comment }) => (
<div key={reviewId}>
<h3>{reviewer.displayName}</h3>
<p>{comment}</p>
</div>
))}
</div>
);
}} />
Prop | Type | Description |
---|---|---|
featurableId | string | Featurable widget ID |
reviews | GoogleReview[] | Array of reviews to display, fetched using dangerouslyFetchPlaceReviews |
layout | "badge" | "carousel" | "custom" | Layout of the reviews component |
nameDisplay? | "fullNames" | "firstAndLastInitials" | "firstNamesOnly" | How to display names on reviews |
logoVariant? | "logo" | "icon" | "none" | How to display the Google logo |
maxCharacters? | number | When collapsed, the maximum number of characters to display in the review body |
dateDisplay? | --- | How to display the review date |
reviewVariant? | --- | Review layout variations |
theme? | "light" | "dark" | Color scheme of the component |
--- | Carousel Props | --- |
carouselSpeed? | number | Autoplay speed of the carousel in milliseconds |
carouselAutoplay? | boolean | Whether to autoplay the carousel |
maxItems? | number | Maximum number of items to display at any one time in carousel |
--- | Badge Props | --- |
profileUrl? | string | Link to Google Business profile, if manually fetching reviews via Place API. Using Featurable API will automatically supply this URL. |
This project is licensed under the MIT License - see the LICENSE file for details. By using the Featurable API, you agree to the Featurable Terms of Service.
This library uses slick-carousel
and react-slick
for the carousel layout.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
FAQs
A React component to easily display Google reviews using Google Places API or Google My Business API.
The npm package react-google-reviews receives a total of 254 weekly downloads. As such, react-google-reviews popularity was classified as not popular.
We found that react-google-reviews demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.