Retool
About Debug
It is not very convenient to debug JavaScript in retool, but there are still ways to go:
- console.log()
— It just works like the normal log in JS, and the output would be shown in Console window which is at the right bottom of the retool develop window. I used this a lot. - utils.showNotification()
— I didn’t use it, but according to the description, it should work like the alert on website. - return
— I didn’t use this method too.
Passing Parameters
The modal works like a react component. The JS Query works like a JavaScript function.
But they can NOT receive parameters, and can NOT return any thing (while a sql query can return the result).
So to realize similar features, global variables are used.
Sounds like some language I havn’t used for decades, maybe Assembly Language?
Retool & React
When I started with retool, I got the feeling that retool was kind of similar to react.
Maybe retool was built with react?
We can use react to write custom components, and then import them into retool. This can be some proof.
I havn’t tried it, but maybe someday I will have to write my own components.
Related Platforms:
(Notion) (Blog)
A website to optimize your resume and to boost your career:
(Nonpareil.me)
About Debug
在retool里调试JavaScript不是很方便,不过还是有些办法的:
- console.log()
— 和正常的JS调试中的日志很像。打印结果显示在右下角的console容器里。我就是用这种方法调试的。 - utils.showNotification()
— 我没用过,不过从描述来看,应该类似于开发网页时用的alert功能。 - return
— 我也没用这个功能。
传递参数
retool的modal看起来像是个react组件。JS Query看起来像是JS的函数。
但是这两个都不能接收参数,也不能返回结果。SQL Query可以返回查询结果,当然,这也是retool最大的优势所在。
所以要实现类似的能力,需要使用全局变量。
看起来像是某种低级语言。汇编?
Retool & React
我开始使用retool时就觉得它很像react。可能它就是用react编写的?
retool支持的自定义组件,需要用react开发,这算是个证明吧。
我还没尝试,不过后期应该会有机会编写自己的组件。
其它平台:
(Notion) (Blog)
优化简历,助力职场:
(Nonpareil.me)