The Michael Pollan meal plan

I go through periods where I’ve eaten this way consistently only to stop sometime later. That’s fine, that’s life. To make it a bit fun, game-ify it a bit and maybe keep it up longer, I created the…


独家优惠奖金 100% 高达 1 BTC + 180 免费旋转

Marionette Views With JSX Templates

Edit — 5/30/2018 —

In a previous story, I wrote about how you can correctly render a Marionette View in a React Component, and vice-versa.

In this story I will show you how to use JSX in your Marionette template function, as opposed to a template string or Handlebars.

First, let’s look at the decorator you will need to allow a View to utilize JSX:

Whoa, did we just remove our dependency of jQuery altogether? That would be pretty cool! 😎

Here is an example usage of this decorator:

What benefits do we get from doing this? Well, if you have an existing Marionette codebase that you want to use JSX in instead of template strings or handlebars, this is a nice way of doing so. It also opens the door for completely removing your dependency on jQuery if you wanted to do something like that.

Let me know what you think in the comments! I’d love to know if you end up using this in your project.

Add a comment

Related posts:

VARcrypt publish Roadmap for next 3 years

VARcrypt is the world’s first blockchain specific hardware agnostic platform designed specifically for VR (Virtual Reality), AR (Augmented Reality), legacy content (film, television, music, print…

What is your happiness?

Happiness is an emotional state characterize by feeling of joy, satisfaction and fulfilment. while happiness has many different definitions, it is often describe as involving positive emotions and…

A Comparison of Waterfall and Agile Methods

I started my career as a young intern in a big telecom company. Back then, software development projects would span months, if not years. Project managers had long Excel sheets and complicated…