react-admin-firebase
react-admin-firebase copied to clipboard
No data on first load
I see a "No {collection-name} yet" message on first load, but if I refresh or switch tabs then the data loads.
See problem in attached gif.
recreate
- Start a new project in line with the demo on npm and the RA tutorial.
- Add FB config.
- Downgrade FB version to
7.24.0
because of #207. -
yarn start
to run the app, then see problem.
My code:
import React from "react";
import { Admin, Resource, ListGuesser } from "react-admin";
import { FirebaseDataProvider, RAFirebaseOptions } from "react-admin-firebase";
import firebaseConfig from "./firebaseConfig.js";
const options: RAFirebaseOptions = {
logging: true,
watch: ["blackTeas", "users"],
};
const dataProvider = FirebaseDataProvider(firebaseConfig, options);
function App() {
return (
<Admin dataProvider={dataProvider}>
<Resource name="blackTeas" list={ListGuesser} />
<Resource name="users" list={ListGuesser} />
</Admin>
);
}
export default App;
Here's I'm using ListGuesser
, but it's the same with an actual component.
Did you find a solution?
@John-Oula this should be fixed now.
What version of react-admin-firebase
and firebase
are you using?