Restaurant App is not refreshing view after review

I am starting to learn React Studio by trying the Restaurant app. But when I write a review and either push the cancel or post and then get back to the restaurantDetails view, the restaurant is gone and only the reviews are there.

I have not changed anything, and there is no console error.

I also exported the project and run it with npm start. Same problems…

1 Like

Hi Goran. I have run the restaurant example in the past and had no issues. It’s difficult to troubleshoot though without more info. Feel free to pm or email me and send me the project file - it’s an example project after all so I don’t think there’s any sensitive info …


I checked the template project and there is a “design bug” in the template project file. We’ll release an update to Template project later today and will notify you when it is available.

Ok, great to know! Is it something I can fix?

I tweaked the project a bit. The project was built several years a go so there were couple things that I wanted to change.

Download new project template from here:

The main thing that the project was missing was that Restaurant details screen did not have a data source set. Now the Data source is set to selectedRestaurant Data sheet which is updated every time user clicks restaurant item in the List/Grid. Basically there is an interaction which saves the restaurant’s Document key into Data slot. This Data slot is then used in the selectedRestaurant collection id to point to a selected restaurant’s document.

Please note that you need to have your own Firebase backend to run the project.

P.S. Here’s the Mobile preview link to my project:

The link will work after about a month from now

Ok I had the impressions that the info was passed from the main screen to detail screen.

I got most of the project working with my firestore setup.

Good stuff :slight_smile: It’s been a while since I had run that project. Don’t remember if it ran right out of the box or if I had to tweak anything. But I was able to get it to run pretty good … It’s a great example project.

There was a conversion of the old project to the “new” RS version which it informed about with a message when I opened the project. I’m about to test the new version soon.

You can pass some props to another screen but if I remember right the carried props are only the ones that are visible on the list item.

Ok, trying to run the new project: FireBaseRestaurantsReactStudioDemoNoConfig2021.rsproj

Got Error: Firebase: Firebase App named ‘[DEFAULT]’ already exists (app/duplicate-app).

Remeber I had it on my second test before and somehow the error when away, probably after connecting my firestore.

Ok, solved! It’s working now with my Firebase/Firestore configuration. The detail view is also working as intended!

1 Like

Sounds like there are two Firebase instances in the project. Check if there are two Firebase Data plugins in the ”Data plugin” section.

Also if for some reason the code generation has not been able to delete all files you could remove the generated folder from ”works in progress” directory and regenerate code.

1 Like

it’s a great example project