implicit-lime
implicit-lime17mo ago

How to use Refine with Javascript

Hello, What do I have to do to setup Refine to use JavaScript instead of typescript? I have checked the Javascript example but the setup is not obvious to me. Thanks for your help.
11 Replies
kapa.ai
kapa.ai17mo ago
Hey @kataiwo2023! I'm the kapa.ai support bot. I've searched through the docs to try to answer your question. :wave: ---------------------- To set up Refine with JavaScript, you can follow the example provided in the documentation. First, you need to create a new Refine project using the create-refine-app command. Here's the command to create a project with the JavaScript example:
npm create refine-app@latest -- --example with-javascript
npm create refine-app@latest -- --example with-javascript
This command will create a new Refine project using the JavaScript example. You can then navigate to the project folder and start the development server. For more information, you can check the JavaScript example documentation (https://refine.dev/docs/examples/javascript). ----------------------
kapa.ai
kapa.ai17mo ago
<@1085267315102335057> kapa.ai is still learning and improving, please let us how it did by reacting below
protestant-coral
protestant-coral17mo ago
when you use .js extension, is it not work ?
implicit-lime
implicit-lime17mo ago
I actually started a TypeScript app which I am new to, but I thought I could learn along. Then I added Editorjs with a .js extension, but it gave an error reading the Editorjs package. So, I now thought I could make the entire app a javascript, that's why I asked the question.
protestant-coral
protestant-coral17mo ago
yes you can. what is editorjs ? i don't think it's came from refine
implicit-lime
implicit-lime17mo ago
It is an excelletnt text editor.
protestant-coral
protestant-coral17mo ago
what is the error ?
implicit-lime
implicit-lime17mo ago
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'firstInput') This is the error and when I checked the details it was from the EditorJs library. I know this works flawlessly in Javascript, that's why I was trying to explore restarting the project in Javascript. Thanks.
protestant-coral
protestant-coral17mo ago
TypeScript or JavaScript should not differ unless has something went wrong on bundling process. But i think it's a long shot Do you have firstInput variable somewhere in your code ? Can you double check your undefined controls please
implicit-lime
implicit-lime17mo ago
No, I checked that the error referenced the EditorJs library. I've googled and it seems there is a problem using the Editor Js with TypeScript.
protestant-coral
protestant-coral17mo ago
I understand. I suggest you too open an issue on Editorjs forums. but if you think it's related to refine with editorjs and if you reproduce the problem with working application on codesandbox or any other platform, i will happy to debug
More Posts
Display success toast notificationI have created auth provider and i implemented login functionality .when I login it display toast uHow can I customize useRegister onSuccess error toast notification message?This is the refine V4 source code for useRegister hook. There is error handling, which by default thSupabase Set role upon signup or signInWithOAuthHi again everyone, How to set claim for role in Supabase when user signup with email and password orResource in useCustomMutation successNotification parameterHow do I access or pass a resource name into useCustomMutation? I use this hook to have a reorderingUse more than one Supabase Table on one PageHey lovely Refine Team, I cant find how to use Data of two Supabase Tables on one Page.how to adding custom type in option(queryOptions) select useCustom ?my use case is to overrides data from api via select options(queryOptions) but i dont know how to aTSconfig errorHey Everyone - I was wondering if anyone else was running into these errors as they were starting a I can't connect my client id as it is asking for a string instead of client_id: process.env.REACT_API can't connect my client id as it is asking for a string instead of client_id: process.env.REACT_API'm trying to create a projectHello everyone, I'm trying to create a project but it only comes with the header, how do I get the sError after upgrade to v4: Uncaught Error: No QueryClient set, use QueryClientProvider to set oneHello everything is fine? by the stack trace the error is in the method: useIsAuthenticated, I am us