Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/react-async

Package Overview
Dependencies
Maintainers
12
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/react-async - npm Package Compare versions

Comparing version 1.2.4 to 1.2.5

1

dist/Async.d.ts

@@ -7,2 +7,3 @@ import * as React from 'react';

defer?: DeferTiming;
renderLoading?(): React.ReactNode;
}

@@ -9,0 +10,0 @@ interface Props<Value> extends LoadProps<Value>, AsyncPropsRuntime {

2

package.json
{
"name": "@shopify/react-async",
"version": "1.2.4",
"version": "1.2.5",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Tools for creating powerful, asynchronously-loaded React components.",

@@ -127,4 +127,10 @@ # `@shopify/react-async`

If you need to customize the deferring behaviour at runtime, the library always allows you to pass an `async` prop with some custom options for the underlying `<Async />` loader component (**note**: this library reserves the `async` prop name, so you can’t use that name for any of your component’s own props, or for the props you specify in the `renderPreload`, `renderPrefetch`, or `renderKeepFresh` options).
#### Overwriting properties
The library always allows you to pass an `async` prop with some custom options for the underlying `<Async />` loader component (**note**: this library reserves the `async` prop name, so you can’t use that name for any of your component’s own props, or for the props you specify in the `renderPreload`, `renderPrefetch`, or `renderKeepFresh` options).
Currenty the library allows you to overwite two properties:
##### `defer?: DeferTiming`
```tsx

@@ -157,2 +163,17 @@ import {createAsyncComponent, DeferTiming} from '@shopify/react-async';

##### `renderLoading?(): React.ReactNode`
```tsx
import {createAsyncComponent} from '@shopify/react-async';
import {Spinner} from '@shopify/polaris';
// No loading state
const MyComponent = createAsyncComponent({
load: () => import('./MyComponent'),
});
// But this instance will render <Spinner /> as its loading state
<MyComponent async={{renderLoading: () => <Spinner />}} />;
```
### `PrefetchRoute` and `Prefetcher`

@@ -159,0 +180,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc