Skip to content

Commit

Permalink
Update readme and release me
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-mck committed Sep 6, 2023
1 parent 4c77692 commit e5a49ee
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ train_evaluation.r2_score_linear_regression:
### Standalone React component usage
To use Kedro-Viz as a standalone React component, import the component and supply a data JSON as prop:
To use Kedro-Viz as a standalone React component, you can follow the example below. However, please note that Kedro-Viz does not support server-side rendering (SSR). If you're using Next.js or another SSR framework, you should be aware of this limitation.
```javascript
import KedroViz from '@quantumblack/kedro-viz';
import '@quantumblack/kedro-viz/lib/styles.min.css';
const MyApp = () => (
<div style={{ height: '100vh' }}>
Expand All @@ -166,6 +167,23 @@ const MyApp = () => (
);
```
To use with NextJS:
```javascript
import '@quantumblack/kedro-viz/lib/styles.min.css';
import dynamic from 'next/dynamic';
const NoSSRKedro = dynamic(() => import('@quantumblack/kedro-viz'), {
ssr: false,
});
const MyApp = () => (
<div style={{ height: '100vh' }}>
<NoSSRKedro data={json} />
</div>
);
```
The JSON can be obtained by running:
```bash
Expand Down
3 changes: 1 addition & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Please follow the established format:

## Bug fixes and other changes

- Resolved various bugs affecting server-side rendering, updated dependencies to ensure compatibility with Vite and Next.js environments (#1508)
- Updated dependencies to ensure compatibility with Vite and Next.js environments, combine css into a signle file for npm library (#1510)

# Release 6.5.0

Expand All @@ -25,7 +25,6 @@ Please follow the established format:
- Remove python upper-bound requirements and add KedroVizPythonVersion warning. (#1506)
- Resolved various bugs affecting server-side rendering, updated dependencies to ensure compatibility with Vite and Next.js environments (#1508)


# Release 6.4.0

## Major features and improvements
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quantumblack/kedro-viz",
"version": "6.5.1",
"version": "6.5.0",
"description": "Kedro-Viz is an interactive development tool for building data science pipelines with Kedro.",
"main": "lib/components/app/index.js",
"files": [
Expand All @@ -21,7 +21,7 @@
"lib": "npm-run-all -s lib:clean lib:copy lib:css lib:webpack lib:babel lib:prune",
"lib:clean": "rm -rf lib",
"lib:copy": "cp -rf src lib",
"lib:css": "sass --no-source-map lib/. && cleancss -o lib/styles/styles.min.css lib/**/*.css",
"lib:css": "sass --no-source-map lib/. && cleancss -o lib/styles.min.css lib/**/*.css",
"lib:webpack": "webpack --config webpack.lib.js",
"lib:babel": "babel lib --out-dir lib",
"lib:prune": "find lib -type f -name '*.test.*' -delete && find lib -type f -name '*.scss' -delete && find lib/components -type f -name '*.css' -delete",
Expand Down

0 comments on commit e5a49ee

Please sign in to comment.