Loading...
Loading...
Compare original and translation side by side
registerLicense()registerLicense()registerLicense()npx syncfusion-license activatesyncfusion-license.txtSYNCFUSION_LICENSEregisterLicense()npx syncfusion-license activatesyncfusion-license.txtSYNCFUSION_LICENSE// src/index.js
import React from 'react';
import ReactDOM from 'react-dom';
import { registerLicense } from '@syncfusion/ej2-base';
// Register Syncfusion license key
registerLicense('YOUR_LICENSE_KEY_HERE');
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);Note: Thepackage is a dependency for all Syncfusion components and will be automatically installed when you install any Syncfusion React package. You don't need to explicitly add it to your@syncfusion/ej2-basefile.package.json
// src/index.js
import React from 'react';
import ReactDOM from 'react-dom';
import { registerLicense } from '@syncfusion/ej2-base';
// 注册Syncfusion许可证密钥
registerLicense('YOUR_LICENSE_KEY_HERE');
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);注意:包是所有Syncfusion组件的依赖项,当您安装任何Syncfusion React包时会自动安装。您无需将其显式添加到@syncfusion/ej2-base文件中。package.json
// src/index.js
import { registerLicense } from '@syncfusion/ej2-base';
registerLicense('Replace your generated license key here');
ReactDOM.render(<App />, document.getElementById('root'));// src/index.js
import { registerLicense } from '@syncfusion/ej2-base';
registerLicense('Replace your generated license key here');
ReactDOM.render(<App />, document.getElementById('root'));// src/index.js
import { registerLicense } from '@syncfusion/ej2-base';
// Use environment variable for license key
const licenseKey = process.env.REACT_APP_SYNCFUSION_LICENSE;
if (licenseKey) {
registerLicense(licenseKey);
}
ReactDOM.render(<App />, document.getElementById('root'));undefined// src/index.js
import { registerLicense } from '@syncfusion/ej2-base';
// 使用环境变量存储许可证密钥
const licenseKey = process.env.REACT_APP_SYNCFUSION_LICENSE;
if (licenseKey) {
registerLicense(licenseKey);
}
ReactDOM.render(<App />, document.getElementById('root'));undefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefined