react-monday-boost-test

components and hooks to ease the monday frontend development

Boost your monday react app

How to use

simply import the Monday component and wrap it around your app:

const mondayClient = mondaySdk();

const App = () => {
  return (
    <Monday mondayClient={mondayClient} listen={['context', 'settings', 'location']}>
      <SomeComponent />
    </Monday>
  );
};

This will give you the state of all of your monday related app state according to what you want to listen, in the default it listens to changes in context, settings and location

To use the useMonday hook simply use it as such:

const SomeComponent = () => {
  const { monday, mondayState } = useMonday();
  const { context, settings, location, filter, events, itemIds } = mondayState;
  const {
    api,
    get,
    listen,
    execute,
    storage,
    set,
    setApiVersion,
    setToken,
    oauth,
  } = monday;

  return <div>I am some component</div>;
};

The mondayState is the state of what you listened to and monday is just the MondaySdk

to see more about the mondayState objects you can listen to you can look at it in the monday docs: https://developer.monday.com/apps/docs/mondaylisten

And to see the whole MondaySdk you can look speciffacaly at it here: https://developer.monday.com/apps/docs/introduction-to-the-sdk

have fun :)