Check out example codes for "mustache js how to use partials in html". It will help you in understanding the concepts better.

Code Example 1

example you have these in your html:

<script type="text/html" id="ul-template">
    <ul id="list">
        {{> li-templ}}

<script type="text/html" id="ul-template2">
    <div id="list2">
        {{> li-templ}}

<script type="text/html" id="li-templ">
    <p>{{ name }}</p>

Here's some jQuery to do just that:

var view = {"name" : "You"},
li = $('#li-templ').html(), 
partials = {"li-templ": li},
ul1 = Mustache.to_html($('#ul-template').html(), view, partials),
ul2 = Mustache.to_html($('#ul-template2').html(), view, partials);;

document.write(ul1, ul2);

Learn ReactJs, React Native from