2.0.0-beta.111 • Published 5 years ago

react-radar v2.0.0-beta.111

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago
// hello-world.js
import Radar from 'react-radar'


const Viewer = Radar.createRecord({
  name: 'Viewer',
  field: {
    uid: Radar.Key(),
    username: null,
    lastSeen: v => new Date(val),
    joinedOn: v => new Date(val)
  }
})

const GetViewer = Radar.createQuery({
  name: 'GetViewer',
  requires: props => ({viewer: Viewer`username`})
})


export default function App (props) {
  return (
    <Radar.Store
      cache={Radar.createCache()}
      network={Radar.createNetwork({url: 'https://radar-app.com/radar'})}
    >
      <Radar.Query connect='viewer' run={GetViewer()}>
        {({viewer}, radar) =>
          radar.statusText === 'loading'
            ? 'Loading...'
            : radar.statusText === 'error'
              ? <button onClick={radar.reload}>Try again?</button>
              : `Hello ${viewer.username}`}
      </Radar.Query>
    </Radar.Store>
  )
}


2.0.0-beta.111

5 years ago

2.0.0-beta.110

5 years ago

2.0.0-beta.109

5 years ago

2.0.0-beta.108

5 years ago

2.0.0-beta.107

5 years ago

2.0.0-beta.106

5 years ago

2.0.0-beta.105

5 years ago

2.0.0-beta.104

5 years ago

2.0.0-beta.103

5 years ago

2.0.0-beta.102

5 years ago

2.0.0-beta.101

5 years ago

2.0.0-beta.100

5 years ago

2.0.0-beta.99

5 years ago

2.0.0-beta.98

5 years ago

2.0.0-beta.97

5 years ago

2.0.0-beta.96

5 years ago

2.0.0-beta.95

5 years ago

2.0.0-beta.94

5 years ago

2.0.0-beta.93

5 years ago

2.0.0-beta.92

5 years ago

2.0.0-beta.91

5 years ago

2.0.0-beta.90

5 years ago

2.0.0-beta.89

5 years ago

2.0.0-beta.88

5 years ago

2.0.0-beta.87

5 years ago

2.0.0-beta.86

5 years ago

2.0.0-beta.85

5 years ago

2.0.0-beta.84

5 years ago

2.0.0-beta.83

5 years ago

2.0.0-beta.82

6 years ago

2.0.0-beta.81

6 years ago

2.0.0-beta.80

6 years ago

2.0.0-beta.79

6 years ago

2.0.0-beta.78

6 years ago

2.0.0-beta.77

6 years ago

2.0.0-beta.76

6 years ago

2.0.0-beta.75

6 years ago

2.0.0-beta.74

6 years ago

2.0.0-beta.73

6 years ago

2.0.0-beta.72

6 years ago

2.0.0-beta.71

6 years ago

2.0.0-beta.70

6 years ago

2.0.0-beta.69

6 years ago

2.0.0-beta.68

6 years ago

2.0.0-beta.67

6 years ago

2.0.0-beta.66

6 years ago

2.0.0-beta.65

6 years ago

2.0.0-beta.64

6 years ago

2.0.0-beta.63

6 years ago

2.0.0-beta.62

6 years ago

2.0.0-beta.61

6 years ago

2.0.0-beta.60

6 years ago

2.0.0-beta.59

6 years ago

2.0.0-beta.58

6 years ago

2.0.0-beta.57

6 years ago

2.0.0-beta.56

6 years ago

2.0.0-beta.55

6 years ago

2.0.0-beta.54

6 years ago

2.0.0-beta.53

6 years ago

2.0.0-beta.52

6 years ago

2.0.0-beta.51

6 years ago

2.0.0-beta.50

6 years ago

2.0.0-beta.49

6 years ago

2.0.0-beta.48

6 years ago

2.0.0-beta.47

6 years ago

2.0.0-beta.46

6 years ago

2.0.0-beta.45

6 years ago

2.0.0-beta.44

6 years ago

2.0.0-beta.43

6 years ago

2.0.0-beta.42

6 years ago

2.0.0-beta.41

6 years ago

2.0.0-beta.40

6 years ago

2.0.0-beta.39

6 years ago

2.0.0-beta.38

6 years ago

2.0.0-beta.37

6 years ago

2.0.0-beta.36

6 years ago

2.0.0-beta.35

6 years ago

2.0.0-beta.34

6 years ago

2.0.0-beta.33

6 years ago

2.0.0-beta.32

6 years ago

2.0.0-beta.31

6 years ago

2.0.0-beta.30

6 years ago

2.0.0-beta.29

6 years ago

2.0.0-beta.28

6 years ago

2.0.0-beta.27

6 years ago

2.0.0-beta.26

6 years ago

2.0.0-beta.25

6 years ago

2.0.0-beta.24

6 years ago

2.0.0-beta.23

6 years ago

2.0.0-beta.22

6 years ago

2.0.0-beta.21

6 years ago

2.0.0-beta.20

6 years ago

2.0.0-beta.19

6 years ago

2.0.0-beta.18

6 years ago

2.0.0-beta.17

6 years ago

2.0.0-beta.16

6 years ago

2.0.0-beta.15

6 years ago

2.0.0-beta.14

6 years ago

2.0.0-beta.13

6 years ago

2.0.0-beta.12

6 years ago

2.0.0-beta.11

6 years ago

2.0.0-beta.10

6 years ago

2.0.0-beta.9

6 years ago

2.0.0-beta.8

6 years ago

2.0.0-beta.7

6 years ago

2.0.0-beta.6

6 years ago

2.0.0-beta.5

6 years ago

2.0.0-beta.4

6 years ago

2.0.0-beta.3

6 years ago

2.0.0-beta.2

6 years ago

2.0.0-beta.1

6 years ago

2.0.0-beta.0

6 years ago

2.0.0-beta

6 years ago

1.0.0-beta.16

6 years ago

1.0.0-beta.15

6 years ago

1.0.0-beta.14

6 years ago

1.0.0-beta.13

6 years ago

1.0.0-beta.12

6 years ago

1.0.0-beta.11

6 years ago

1.0.0-beta.10

6 years ago

1.0.0-beta.9

6 years ago

1.0.0-beta.8

6 years ago

1.0.0-beta.7

6 years ago

1.0.0-beta.6

6 years ago

1.0.0-beta.5

6 years ago

1.0.0-beta.4

6 years ago

1.0.0-beta.3

6 years ago

1.0.0-beta.2

6 years ago

1.0.0-beta.1

6 years ago

1.0.0-beta.0

6 years ago

1.0.0-beta

6 years ago

0.2.0-alpha.40

7 years ago

0.2.0-alpha.39

7 years ago

0.2.0-alpha.38

7 years ago

0.2.0-alpha.37

7 years ago

0.2.0-alpha.36

7 years ago

0.2.0-alpha.35

7 years ago

0.2.0-alpha.34

7 years ago

0.2.0-alpha.33

7 years ago

0.2.0-alpha.32

7 years ago

0.2.0-alpha.31

7 years ago

0.2.0-alpha.30

7 years ago

0.2.0-alpha.29

7 years ago

0.2.0-alpha.28

7 years ago

0.2.0-alpha.27

8 years ago

0.2.0-alpha.26

8 years ago

0.2.0-alpha.25

8 years ago

0.2.0-alpha.24

8 years ago

0.2.0-alpha.23

8 years ago

0.2.0-alpha.22

8 years ago

0.2.0-alpha.21

8 years ago

0.2.0-alpha.20

8 years ago

0.2.0-alpha.19

8 years ago

0.2.0-alpha.18

8 years ago

0.2.0-alpha.17

8 years ago

0.2.0-alpha.16

8 years ago

0.2.0-alpha.15

8 years ago

0.2.0-alpha.14

8 years ago

0.2.0-alpha.13

8 years ago

0.2.0

8 years ago

0.2.0-alpha.12

8 years ago

0.2.0-alpha.11

8 years ago

0.2.0-alpha.10

8 years ago

0.2.0-alpha.9

8 years ago

0.2.0-alpha.8

8 years ago

0.2.0-alpha.7

8 years ago

0.2.0-alpha.6

8 years ago

0.2.0-alpha.5

8 years ago

0.2.0-alpha.4

8 years ago

0.2.0-alpha.3

8 years ago

0.2.0-alpha.2

8 years ago

0.2.0-alpha.1

8 years ago

0.2.0-alpha.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.21-alpha

8 years ago

0.0.20-alpha

8 years ago

0.0.19-alpha

8 years ago

0.0.18-alpha

8 years ago

0.0.17-alpha

8 years ago

0.0.16-alpha

8 years ago

0.0.15-alpha

8 years ago

0.0.14-alpha

8 years ago

0.0.13-alpha

8 years ago

0.0.12-alpha

8 years ago

0.0.11-alpha

8 years ago

0.0.10-alpha

8 years ago

0.0.9-alpha

8 years ago

0.0.8-alpha

8 years ago

0.0.7-alpha

8 years ago

0.0.6-alpha

8 years ago

0.0.5-alpha

8 years ago

0.0.4-alpha

8 years ago

0.0.3-alpha

8 years ago

0.0.2-alpha

8 years ago

0.0.1-alpha

8 years ago