Skip to content

Commit

Permalink
feat: remove init use in react buildless examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Sep 26, 2024
1 parent f4bf1c7 commit 8f745a1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
6 changes: 2 additions & 4 deletions examples/boilerplates/react-buildless/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
<script type="text/babel" data-type="module">
import React, { useState, useEffect } from 'react';
import { createRoot } from 'react-dom/client';
import { init } from 'zebar';
import * as zebar from 'zebar';

const zebarCtx = await init();

const providers = await zebarCtx.createProviderGroup({
const providers = await zebar.createProviderGroup({
cpu: { type: 'cpu' },
battery: { type: 'battery' },
memory: { type: 'memory' },
Expand Down
6 changes: 2 additions & 4 deletions examples/starter/vanilla.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
<script type="text/babel" data-type="module">
import React, { useState, useEffect } from 'react';
import { createRoot } from 'react-dom/client';
import { init } from 'zebar';
import * as zebar from 'zebar';

const zebarCtx = await init();

const providers = await zebarCtx.createProviderGroup({
const providers = await zebar.createProviderGroup({
network: { type: 'network' },
cpu: { type: 'cpu' },
date: { type: 'date', formatting: 'EEE d MMM t' },
Expand Down
6 changes: 2 additions & 4 deletions examples/starter/with-glazewm.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
<script type="text/babel" data-type="module">
import React, { useState, useEffect } from 'react';
import { createRoot } from 'react-dom/client';
import { init } from 'zebar';
import * as zebar from 'zebar';

const zebarCtx = await init();

const providers = await zebarCtx.createProviderGroup({
const providers = await zebar.createProviderGroup({
network: { type: 'network' },
glazewm: { type: 'glazewm' },
cpu: { type: 'cpu' },
Expand Down
6 changes: 2 additions & 4 deletions examples/starter/with-komorebi.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
<script type="text/babel" data-type="module">
import React, { useState, useEffect } from 'react';
import { createRoot } from 'react-dom/client';
import { init } from 'zebar';
import * as zebar from 'zebar';

const zebarCtx = await init();

const providers = await zebarCtx.createProviderGroup({
const providers = await zebar.createProviderGroup({
network: { type: 'network' },
komorebi: { type: 'komorebi' },
cpu: { type: 'cpu' },
Expand Down

0 comments on commit 8f745a1

Please sign in to comment.