专栏首页Jerry的SAP技术分享如何得到React应用转换后的JavaScript代码

如何得到React应用转换后的JavaScript代码

Source code: https://github.com/i042416/react-demos/blob/master/demo02/index.html

If you would like to debug line 20 and 24 and set a JavaScript breakpoint there, the breakpoint can never be triggered, since the source code is written with a combination of both JS and JSX( the code wrapped with “<>” will be parsed based on HTML rule, and “{}” with JavaScript rule. Pay attention to the type “text/babel” in line 16 ).

Instead, insert a line “debugger” before the JavaScript code you would like to debug,

And then the breakpoint will be triggered as expected.

If you would like to view the converted JavaScript code, go to the third callstack:

Go to console and type “new Function(transform(code, opts).code).toString();”, then you can see the converted source code:

The framework has already provided a handy tool for converted source code view: just click the hyperlink in the console here:

Then you can also see the converted source code in new Chrome tab:

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 一个小技巧,快速找出一段ABAP代码里访问到的所有透明表

    If you need a list of all transparent tables used in a given ABAP class ( or fun...

    Jerry Wang
  • SAP S/4HANA里如何创建Customer主数据以及执行后续处理

    1, Launch tcode: BP and select the Organization 2, Maintain the information for...

    Jerry Wang
  • SAP CDS view自学教程之一:如何测试基于SAP CDS view自动生成的OData服务

    I am a newbie of CDS view related topic and recently I have to learn it. I will ...

    Jerry Wang
  • BizTalk Server 2006 Virtual Multi-Box Install

    One of the great improvements in BizTalk Server 2006 was the ease of the install...

    阿新
  • Peer Code Reviews Made Easy with Eclipse Plug-In

    Origin Article: Peer Code Reviews Made Easy with Eclipse Plug-In Origin Author: ...

    用户1221057
  • 基于双眼视觉的高精度无人机目标定位系统(CS CV)

    在工作过程中,无人驾驶车辆常常需要高精度地定位目标。在无人材料搬运车间中,无人车辆需要对工件进行高精度的姿态估计以准确地抓住工件。在此背景下,本文提出了一种基于...

    gaowanting
  • Python IDE不二之选:Pycharm

    它分为专业版(Full-fledged Professional)和免费社区版(Free Community)。作为一名Python 的业余爱好者,强烈推荐大家...

    用户6021891
  • SQL Server 2008安装报错

    本文转载自:SQL SERVER 2008 EXPRESS setup -- The specified credentials for the sql ser...

    魏晓蕾
  • 系统运维工程师的法宝:python pa

    安装:pip install Paramiko paramiko是用python语言写的一个模块,遵循SSH2协议,支持以加密和认证的方式,进行远程服务器的连...

    py3study
  • Knapsack problem algorithms for my real-life carry-on knapsack

    I'm a nomad and live out of one carry-on bag. This means that the total weight o...

    李海彬

扫码关注云+社区

领取腾讯云代金券