Browser console debugging features for Link-Redux projects.
First install the react devtools if you haven't got them already.
yarn add @ontola/link-devtools V npm i @ontola/link-devtools
Add the following to the place where your LinkedRenderStore is initialized;
import { createStore } from 'link-redux';
import enableDevtools from '@ontola/link-devtools'
// Wherever
const lrs = createStore();
enableDevtools(lrs);The dev object should now be present when loading your app.
dev.help // Will output the available commandsIf dev is undefined, please check that the react devtools are in fact installed and enabled in
your current browser session.
Note: These methods are convenience methods, please do not use or depend on them in your code!
Try calling dev.help to see all available commands.
The dev.obj() function can take an URL as a string or NamedNode and will show the data currently in the store.
Select a LinkedResourceContainer in the React devtools and call dev.data in the browser console.
When selecting a LinkedResourceContainer, call dev.reload to force link to reload the resource from the server.