@bloomreach/react-sdk
Advanced tools
Comparing version 16.0.0-alpha.0 to 16.0.0
{ | ||
"name": "@bloomreach/react-sdk", | ||
"version": "16.0.0-alpha.0", | ||
"version": "16.0.0", | ||
"description": "Bloomreach SPA SDK for React", | ||
@@ -43,3 +43,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@bloomreach/spa-sdk": "16.0.0-alpha.0" | ||
"@bloomreach/spa-sdk": "16.0.0" | ||
}, | ||
@@ -108,3 +108,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "52d2f51dcc3d265ba6ba7d9c5b9cdcf631afb701" | ||
"gitHead": "d4dc481e96e8a4e7aec496dacd1c9cd3cd0175db" | ||
} |
@@ -74,2 +74,38 @@ # Bloomreach React SDK | ||
### Non-blocking render mode (NBRMode) | ||
Non-blocking rendering mode can be used to decrease the time for your application to load fully on the client side. By | ||
default the NBRMode configuration is `false` to avoid breaking existing setups. Setting it to `true` will enable | ||
non-blocking render mode. When the mode is active the children of the BrPage component will start mounting while the | ||
Page Model is being fetched. These children might contain logic themselves that queries some external API and using | ||
non-blocking render mode would allow this to be executed in parallel to requesting the Page Model. | ||
```jsx | ||
const fetchData = async () => { | ||
const data = await fetch('https://yourapi.com'); | ||
} | ||
function MyComponent() { | ||
useEffect(() => { | ||
// This will run in parallel to fetching the PageModel from the Delivery API | ||
fetchData().catch(console.error); | ||
}, []); | ||
return `<div>Hello</div>` | ||
} | ||
export default function App() { | ||
const configuration = { | ||
/* ... */ | ||
NBRMode: true, | ||
}; | ||
return ( | ||
<BrPage configuration={configuration} mapping={{ ... }}> | ||
<MyComponent/> | ||
</BrPage> | ||
); | ||
} | ||
``` | ||
### Configuration | ||
@@ -76,0 +112,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
84659
0
498
+ Added@bloomreach/spa-sdk@16.0.0(transitive)
- Removed@bloomreach/spa-sdk@16.0.0-alpha.0(transitive)
Updated@bloomreach/spa-sdk@16.0.0