Google Colab tips: using both %%writefile magic and %%javascript magic in the same cell

This is a simple discovery when I want to write a react component for the Streamlit app in Colab.

See screenshot below, commenting %%javascript line with // (javascript comment), this make the Colab still consider this block as javascript (with all those nice javascript coloring) while does not collide with the %%writefile magic.

Have a good day and happy coding.