JSX in Tonic

node v0.12.18
version: 1.0.0
endpointsharetweet
Tonic supports JSX right out of the box. Make sure to include React and you're all set to go:
var React = require("react"); var myGreatReactElement = <div>Hello World!</div>; React.renderToString(myGreatReactElement);
You'll notice that we used renderToString instead of render. That's because Tonic is a node environment. Tonic is a great way to test server rendering for React. To learn more about React, check out https://facebook.github.io/react/docs/getting-started.html
Loading…

3 comments

  • posted 2 months ago by 5dab241ba284c40013cbf083
    https://tonicdev.com/tonic/jsx-in-tonic
  • posted 3 days ago by 5debaae293d788001a9ec11a
    magnet:?xt=urn:btih:989408b3da7d4991b56e2e0ec811ec8da4c3f272&dn=www.TamilRockers.ws%20-%20Evanukku%20Engeyo%20Matcham%20Irukku%20(2018)%5bProper%20Tamil%20-%201080p%20HDRip%20-%20x265%20-%20HEVC%20-%201.5GB%20-%20ESubs%5d.mkv&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.pirateparty.gr%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.tiny-vps.com%3a6969%2fannounce&tr=udp%3a%2f%2fopen.demonii.si%3a1337%2fannounce&tr=udp%3a%2f%2fipv4.tracker.harry.lu%3a80%2fannounce&tr=udp%3a%2f%2ftw.opentracker.ga%3a36920%2fannounce&tr=udp%3a%2f%2fdenis.stalker.upeer.me%3a6969%2fannounce&tr=http%3a%2f%2ft.nyaatracker.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce&tr=udp%3a%2f%2fopen.stealth.si%3a80%2fannounce&tr=udp%3a%2f%2fbt.xxx-tracker.com%3a2710%2fannounce&tr=udp%3a%2f%2ftracker.vanitycore.co%3a6969%2fannounce&tr=http%3a%2f%2ftracker.city9x.com%3a2710%2fannounce&tr=udp%3a%2f%2ftracker.internetwarriors.net%3a1337%2fannounce
  • posted 3 days ago by 5debaae293d788001a9ec11a
    magnet:?xt=urn:btih:989408b3da7d4991b56e2e0ec811ec8da4c3f272&dn=www.TamilRockers.ws%20-%20Evanukku%20Engeyo%20Matcham%20Irukku%20(2018)%5bProper%20Tamil%20-%201080p%20HDRip%20-%20x265%20-%20HEVC%20-%201.5GB%20-%20ESubs%5d.mkv&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.pirateparty.gr%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.tiny-vps.com%3a6969%2fannounce&tr=udp%3a%2f%2fopen.demonii.si%3a1337%2fannounce&tr=udp%3a%2f%2fipv4.tracker.harry.lu%3a80%2fannounce&tr=udp%3a%2f%2ftw.opentracker.ga%3a36920%2fannounce&tr=udp%3a%2f%2fdenis.stalker.upeer.me%3a6969%2fannounce&tr=http%3a%2f%2ft.nyaatracker.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce&tr=udp%3a%2f%2fopen.stealth.si%3a80%2fannounce&tr=udp%3a%2f%2fbt.xxx-tracker.com%3a2710%2fannounce&tr=udp%3a%2f%2ftracker.vanitycore.co%3a6969%2fannounce&tr=http%3a%2f%2ftracker.city9x.com%3a2710%2fannounce&tr=udp%3a%2f%2ftracker.internetwarriors.net%3a1337%2fannounce

sign in to comment