Getting Started
25 Nov 20161 minute to read
This section helps to get started of the CurrencyTextbox component in a React application
Create a CurrencyTextbox
Refer the common React Getting Started Documentation to create an application and add necessary scripts and styles for rendering our ReactJS components.
Create a JSX file and use <EJ.CurrencyTextbox> syntax to render React CurrencyTextbox component. Add required properties to <EJ.CurrencyTextbox> tag element.
ReactDOM.render(
<EJ.CurrencyTextbox>
</EJ.CurrencyTextbox>,
document.getElementById('currency')
);
Define an HTML element for adding CurrencyTextbox in the application and refer the JSX file created.
<div id="currency"></div>
<script type="text/babel" src="sample.jsx">
This will render an empty CurrencyTextbox component on executing.
Configure Properties
In the JSX, need to declare the CurrencyTextbox properties. Refer to the following code,.
ReactDOM.render(
<EJ. CurrencyTextbox value={10} width="250px">
</EJ. CurrencyTextbox >,
document.getElementById('currency')
);
Run the above code to render the following output,
Note: You can find the CurrencyTextbox properties from the API reference document.