Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1.1 KB

File metadata and controls

39 lines (30 loc) · 1.1 KB

  • Declative: By using Fireclient Query Language(FQL), you can write Firestore queries declatively.
  • Scalable: Fireclient is designed to be used on big React applications. It'll speed up your development and keep your source code tidy event if it's scaled.
  • Simple: Quite simple and easy to use for both of big applications and small applications.

Installation

npm install --save react-fireclient
yarn add react-fireclient

Examples

Here is the most simplest example:

function View() {
  const [nagoya, loading, error] = useGetDoc("/cities/nagoya");
  return (
    <>
      {loading && <div>loading</div>}
      {error && <div>error</div>}
      {nagoya && <div>{nagoya.data.name}</div>}
    </>
  );
}

This example will get doc from "/cities/nagoya" in Firestore and render doc data.