Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

react-odata

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-odata

React component to declaratively fetch from OData v4 endpoints

latest
Source
npmnpm
Version
10.1.0
Version published
Maintainers
1
Created
Source

react-odata

React component to declaratively fetch from OData v4 endpoints

Install

yarn add react-odata

or

npm install --save react-odata

Usage

Import

import OData from 'react-odata';

Basic

const baseUrl = 'http://services.odata.org/V4/TripPinService/People';
const query = { filter: { FirstName: 'Russell' } };

<OData baseUrl={baseUrl} query={query}>
  { ({ loading, error, data }) => (
    <div>
      { loading && {/* handle loading here */} }
      { error && {/* handle error here */} }
      { data && {/* handle data here */}}
    </div>
  )}
</OData>
  • See odata-query for supported query syntax

Passes remaining props to underlying <Fetch /> component

<OData baseUrl="http://services.odata.org/V4/TripPinService/People" options={{ credentials: 'include' }} />

FAQs

Package last updated on 19 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts