R
Refine

ask-any-question

How to use Refine with Javascript

Uunwilling-turquoise3/23/2023
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.
Kkapa.ai3/23/2023
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). ----------------------
Kkapa.ai3/23/2023
<@1085267315102335057> kapa.ai is still learning and improving, please let us how it did by reacting below
Pplain-purple3/23/2023
when you use .js extension, is it not work ?
Uunwilling-turquoise3/23/2023
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.
Pplain-purple3/23/2023
yes you can. what is editorjs ? i don't think it's came from refine
Uunwilling-turquoise3/23/2023
It is an excelletnt text editor.
Pplain-purple3/23/2023
what is the error ?
Uunwilling-turquoise3/24/2023
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.
Pplain-purple3/24/2023
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
Uunwilling-turquoise3/24/2023
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.
Pplain-purple3/24/2023
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

Looking for more? Join the community!

R
Refine

ask-any-question

Join Server
Recommended 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 usMultitenant URLsHi all! Anyone have more info on how to provide props to the nextjs-router in v4? We are multitenanUsing response data in errorNotification useFormHello, My REST API sends a JSON with explanation of what's wrong with the response when request failImplement Google Maps in a FormHello everyone, I am having trouble implementing google maps in a form where the user should fill soCannot invoke an object which is possibly 'undefined'Hi everyone, can anyone help me with this? I trying to integrate Access Control with Supabase and whhow to prefetch data using refineprefetch data before showing itemCan't change title of AuthPageI tried to change my login page title like this: <AuthPage type="login" title={<h2>WelcoUse modal form to populate an array in the current recordHello all, I need some help here. I'm trying to implement modal form in a project I'm working on witDefine customized Logo on default LoginpageHi, how can i set a logo on default Loginpage. (I am using refine V4)Error Can't resolve 'fs'Hello everyone, I'm facing an error integrating Casbin accessControlProvider here is the code for v4: Supabase: updatePassword not working```javascript forgotPassword: async ({ email }) => { const { error } = await supabaseClient.auth