Trying to create a custom component. Both the new way and legacy way

I am trying to build a scheduler in my app. I found this scheduler here: React Scheduler
GitHub - Bitnoise/react-scheduler

I have tried to install the component by these directions here:

I get stuck as this point.

3. Log in to Retool

npx retool-ccl login

I then tried it the legacy custom component way.

Here is my iframe code.

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Scheduler Integration</title>
        body {
            margin: 0;
    <link rel="stylesheet" href="">
    <script src="" crossorigin></script>
    <script src="" crossorigin></script>
    <script src=""></script>
    <script src=""></script>

    <div id="react"></div>

        window.Retool.subscribe(function(model) {
            if (!model) { return; }

            const { useState, useEffect } = window.React;
            const { Scheduler } = window["reactScheduler"];
            const { createRoot } = window.ReactDOM;

            function App() {
                const [isLoading, setIsLoading] = useState(false);
                const [data, setData] = useState( || []);

                useEffect(() => {

                    // Simulate fetching data
                    setTimeout(() => {
                    }, 1000);
                }, []);

                return window.React.createElement(Scheduler, {
                    isLoading: isLoading,
                    data: data,
                    onItemClick: (clickedItem) => console.log(clickedItem),
                    onFilterData: () => {
                        // Filter your data
                    onClearFilterData: () => {
                        // Clear all your filters
                    config: {
                        filterButtonState: 0,
                        zoom: 0,
                        lang: "en",
                        maxRecordsPerPage: 20,

            const rootElement = document.getElementById('react');
            const root = createRoot(rootElement);

I receive an error when i try the above code.

Hi @Ash

I don't know about the first version, but in the second version the is not available in unpkg CDN because they didn't configure it properly.
You might ask them to fix the issue on their part.

Hope this help.

Thank you, I will try that.