top | item 33936035

(no title)

jennasys | 3 years ago

The ugliness is something I struggled with a bit when I was first using Transcrypt to create React applications with Python. Even though that approach is more of a 1-to-1 Python-to-JS mapping instead of a Python wrapper, I felt all the calls to createElement affected readability. But once I started using a Python decorator to wrap the components in createElement, the code got a lot cleaner. Here's a basic example based on the official React tutorial: https://github.com/JennaSys/tictacreact2/blob/main/tictacrea...

discuss

order

No comments yet.