Skip to content

Optimind-llc/fireclient

Repository files navigation

  • 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.