An Error Occurred - Custom Component

Hello!

I am currently developing a custom component. I am trying to import and use an external library so I don’t have to recreate everything from the ground up. I am importing it successfully, however actually declaring it in my code makes Adalo crash when I try to select the custom component in the Adalo editor.

Here is the code:

The ScheduleSelector tag that is highlighted is breaking the component. Here is what I see when I try to select the component in the Adalo editor for my app:

Screen Shot 2022-07-11 at 2.46.45 PM

Does anyone know why this might be happening? Are there any common reasons why this error occurs in custom components?

Thanks so much.

Hi @knuggie,

Not a custom component developer so can’t help here! :slightly_smiling_face: But I see that Daniel ( @danielcosta ) helped you with a issue about a custom component and maybe he can help here too?

Or other component developers will help here!

And also I think there’s a slack channel for component developers that you can join and ask these questions! I think you need to contact Barrett ( @barrettnash ) to join there!

Thank you

2 Likes

Hey @knuggie, your problem could either be any Typescript file inside your component, or another one. Could you provide some logs from the browser console?

2 Likes

@knuggie this might not work because the library is “react” and not “react-native”. That’s probably why the editor crashed.

Here’s the react-native one:

3 Likes

Hey @danielcosta , so essentially if my custom component is using typescript at all, it will not work - correct? Right now, the folder containing ScheduleSelector has many typescript files.

Thanks.

Hi @James_App_Maker , but in order to run an adalo custom component, is it not a requirement for it to work in both react and react-native? For my usage, this custom component would only be used on with react (not on mobile).

Thanks.

This might help you:

2 Likes

@James_App_Maker - This is very helpful! I will give this a try!

Thanks!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.