# Migrate from old Custom JS

Our new Flutter application is based on the newest 2022 technology. While rebuilding all of our blocks we realised that the current **Custom Javascript** block is based on design patterns which  do not suit the modern way of writing javascript.&#x20;

That's why we decided to make a new and improved Javascript block, using a new bridge for the communication between your Javascript code and the app itself.

> *Existing "Custom JS" block will need to be adjusted before they can work in your new app.*

If you have a Javascript block in your app:

1. Download the code of your Javascript block as a zip file.&#x20;
2. Disable the existing Javascript block in your app.
3. Click the Publish/Update button and choose to publish your app via the new publishing flow. Your app will now be migrated automatically.
4. Open the Content page and add the new Javascript block to your app and configure it.
5. Make some changes to adapt the Javascript code from your old Javascript zip.file to the new Javascript block.
6. Publish your app via the new publishing flow.&#x20;

We have written technical documentation to explain to you how build new Javascript blocks using the new MyJSBlock SDK . [Read more....](/developers/javascript.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appmachine.com/developers/javascript/migrate-from-old-custom-js.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
