<commit_before>#+TITLE: Getting started with JSX
#+AUTHOR: <NAME>

** Getting started with JSX
  - A good introduction to JSX can be found here [[https://jasonformat.com/wtf-is-jsx/][What is JSX]]
** What is JSX; tldr
   - JSX is just a format that is used, the real work is done by the transpiler
   - the transpiler takes this form and calls a function with the args

#+BEGIN_SRC js
/** @jsx transform
*/
let vdom = <div id='foo'>Hello !</div>

// this will be executed as
let vdom = transform(
  'div',
  { id: 'foo' },
  ' Hello !'
)
#+END_SRC
   - we can define the function and its return values<commit_msg>Modifies title<commit_after>#+TITLE: Getting started with JSX
#+AUTHOR: <NAME>

** What is JSX
  - A good introduction to JSX can be found here [[https://jasonformat.com/wtf-is-jsx/][What is JSX]]
** What is JSX; tldr
   - JSX is just a format that is used, the real work is done by the transpiler
   - the transpiler takes this form and calls a function with the args

#+BEGIN_SRC js
/** @jsx transform
*/
let vdom = <div id='foo'>Hello !</div>

// this will be executed as
let vdom = transform(
  'div',
  { id: 'foo' },
  ' Hello !'
)
#+END_SRC
   - we can define the function and its return values
{'fraction_non_alphanumeric': 0.1186161449752883, 'fraction_numerical': 0.0, 'mean_word_length': 3.418181818181818, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6829243', 'n_tokens_mistral': 422, 'n_tokens_neox': 417, 'n_words': 171}