diff --git a/data/project-templates/react-js/package.json b/data/project-templates/react-js/package.json
index 425645b..8e150e4 100644
--- a/data/project-templates/react-js/package.json
+++ b/data/project-templates/react-js/package.json
@@ -10,8 +10,9 @@
"preview": "vite preview"
},
"dependencies": {
- "@golem-sdk/golem-js": "^3.0.0",
- "@golem-sdk/react": "^3.0.1",
+ "@golem-sdk/golem-js": "^3.1.0",
+ "@golem-sdk/react": "^4.0.0",
+ "@golem-sdk/task-executor": "^2.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
diff --git a/data/project-templates/react-js/src/components/NodeVersionCheck.jsx b/data/project-templates/react-js/src/components/NodeVersionCheck.jsx
index 9084878..28c2012 100644
--- a/data/project-templates/react-js/src/components/NodeVersionCheck.jsx
+++ b/data/project-templates/react-js/src/components/NodeVersionCheck.jsx
@@ -1,39 +1,42 @@
import { useExecutor } from "@golem-sdk/react";
-import { ProposalFilterFactory } from "@golem-sdk/golem-js";
-import { NodeVersionCheckTask } from "./NodeVersionCheckTask.jsx";
+import { NodeVersionCheckTask } from "./NodeVersionCheckTask";
export function NodeVersionCheck() {
const { executor, initialize, isInitialized, isInitializing, terminate, error } = useExecutor({
- // What do you want to run
- package: "golem/node:20-alpine",
-
- // How much you wish to spend
- budget: 2,
-
- // How do you want to select market proposals
- proposalFilter: ProposalFilterFactory.limitPriceFilter({
- start: 1.0,
- cpuPerSec: 1.0 / 3600,
- envPerSec: 1.0 / 3600,
- }),
-
+ demand: {
+ workload: {
+ imageTag: "golem/node:20-alpine",
+ },
+ },
// Where you want to spend
payment: {
- network: "goerli",
+ network: "holesky",
+ },
+ market: {
+ // Let's rent the provider for no more than 15 minutes
+ rentHours: 15 / 60,
+ // Let's agree to pay at most 0.5 GLM per hour
+ pricing: {
+ model: "burn-rate",
+ avgGlmPerHour: 0.5,
+ },
},
-
// Control the execution of tasks
- maxTaskRetries: 0,
- taskTimeout: 5 * 60 * 1000,
+ task: {
+ taskTimeout: 5 * 60 * 1000,
+ maxTaskRetries: 0,
+ },
+ // Look at the browser console to see what's happening under the hood
+ enableLogging: true,
});
return (
{error &&
Error: {error.toString()}
}
- {isInitialized &&
}
+ {isInitialized && executor &&
}
{isInitializing &&
Executor is initializing
}
{!isInitialized && (
-