EventrixProvider

EventrixProvider is required when You want use hooks, hocs and component decorators. Provider use react context API to pass all required data by context to hocs, hooks and component decorators. Use EventrixProvider in Your main component of Your application.

import React from "react";
import { EventrixProvider } from "eventrix";
import eventrix from "./eventrix";
import ListComponent from "./ListComponent";

const App = () => {
  return (
    <EventrixProvider eventrix={eventrix}>
      <div className="app-wrapper">
        <h1>MY NEW APP</h1>
        <div className="context">
          <ListComponent />
        </div>
      </div>
    </EventrixProvider>
  );
}

export default App;

Last updated