TinyTick logoTinyTick

Releases

This is a reverse chronological list of the major TinyTick releases, with highlighted features.


v1.2

This is a major release that includes reactivity and an optional module of React bindings.

Manager listeners

There is now a set of new Manager methods that can add listeners for various events. These include:

In all cases, the delListener method should be used to unregister the listener when it is no longer needed.

React bindings

Building on the basic bindings in the previous release, this release adds a set of hooks to benefit from the Manager's reactivity. These include:

In all cases, these hooks operate on the Manager registered in the Provider component so that one Manager can be used consistently throughout the application, something like this:

import {
  Provider,
  useCreateManager,
  useScheduleTaskRunCallback,
  useSetTask,
} from 'tinytick/ui-react';

const App = () => (
  <Provider manager={useCreateManager(createManager)}>
    <Panel />
  </Provider>
);

const Panel = () => {
  useSetTask('ping', async () => await fetch('https://example.org'));
  return <Button />;
};

const Button = () => {
  const callback = useScheduleTaskRunCallback('ping');
  return <button onClick={callback}>Ping</button>;
};

More information and examples for these React features is in the ui-react module API documentation.

Have fun and let us know how it goes!

v1.1

This release contains a very simple React integration. It's in the ui-react module and literally just adds a hook around the createManager function and a context component. Stay tuned for more interesting features in the future!

v1.0

This is the first release! Not much to say, except welcome - and hopefully you get a chance to try TinyTick out and see if it's useful for you.

Want to get started quickly?

npm install tinytick

Here's a minimum viable TinyTick application:

import {createManager} from 'tinytick';

const manager = createManager();
manager.setTask('hello', async (noun) => console.log(`Hello ${noun}!`));

manager.scheduleTaskRun('hello', 'world', 500);
manager.scheduleTaskRun('hello', 'universe', 1000);

manager.start();
// ... wait 550ms to be sure the first task run has been executed
// -> 'Hello world!'

// ... wait 550ms to be sure the second task run has been executed
// -> 'Hello universe!'

Then read our guides and API documentation to learn more about what you can do.

And we've got plans, so stay tuned!