passing flask python variables on the server to reactjs as props -


i'm trying pass flask variables server react can't working. @ moment have render function in reactjs file looks like: reactdom.render(   <attribute prop1='{{ prop1 }}' prop2='{{ prop2 }}' />,   document.getelementbyid('main') ); 

in python on flask server have:

return render_template('index.html', prop1=var1, prop2=var2) 

it should

  <attribute prop1={ prop1 } prop2={ prop2 } /> 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -