HOME DOCS PWA ABOUT
  1. Replicator
    1. Write
    2. Read
    3. Upgrading the Container
  2. Concepts
    1. Storing Information
    2. Writing Specifications
    3. Retrieving Information
  3. Create an App
    1. Create React App
    2. Install Jinaga
    3. Define a Model
    4. Initialize a Starting Point
    5. Declare a Component
    6. Match Successor Facts
    7. Declare a Child Component
  4. Write Tests
    1. Write Some Tests (JavaScript)
    2. Write Some Tests (TypeScript)
    3. Create Related Facts
    4. Query Facts
    5. Export the Model (JavaScript)
    6. Export the Model (TypeScript)
    7. Authorize Facts
  5. Conventions
    1. JavaScript
    2. TypeScript
  6. Reference
    1. Jinaga
      1. fact
      2. query
      3. watch
      4. for
      5. match
      6. exists
      7. notExists
      8. not
      9. hash
      10. login
      11. local
      12. service
      13. onError
      14. onLoading
      15. onProgress
      16. graphviz
      17. inspect
    2. Preposition
      1. then
    3. Syntax diagram
  7. Jinaga React
    1. Composition
    2. Field Specification Functions
      1. field
      2. projection
      3. collection
      4. property
      5. mutable
      6. array
  1. Create an App

Install Jinaga

Let's install Jinaga so that we can get connected to the Replicator, by typing in VS Code's terminal window:

npm install jinaga jinaga-react

Then create a file called jinaga-config.ts in the src directory and add the following code:

import { JinagaBrowser } from "jinaga";

export const j = JinagaBrowser.create({
    httpEndpoint: "http://localhost:8080/jinaga"
});

That will create a Jinaga client for the browser that connects to the Replicator.

Continue With

Define a Model