2017-03-08 49 views
0

我想在<a>應答器內部添加組件的呈現。在html中插入組件

我有一個組件:

import Tableau from "./tableauCOlonnes.jsx"; 

class Views_Default_Mapping extends React.Component { 
    render() { 
    var liste_colonnes = ["Nom", "Age", "Taille"]; 
    const html = 

    return (

     <div className="div_mapping"> 
      <ul> 
       <li> 
        <a href="data:text/html,<Tableau liste_colonnes={liste_colonnes}>" target="tabcontent">Fichier 1</a> 
       </li> 
      </ul> 
     </div> 
    ); 
} 
} 

所以我想補充<Tableau /><a>內的道具,但它不工作。我也嘗試過使用html進行反應,但我不知道該怎麼做,但它也不起作用。我該怎麼做?

回答

0

嘗試

<a href={<Tableau liste_colonnes={liste_colonnes}>} target="tabcontent"> 
    Fichier 1 
</a> 
+0

我沒有任何錯誤,但它顯示框架內的所有頁面:/像頁面內的頁面 – Erlaunis

+0

它不工作,因爲我需要'data:text/html' – Erlaunis