Skip to main content

Announcement

Mini Program Announcement#

Announcement: End of support for JS SDK <4.0#

Date of announcement: 2022-11-21

Announcing the end of support for JS SDK <4.0. Action required: You need to upgrade to JS SDK ^4.x or later and make sure your Mini Program can run on the latest version of Native with SDK ^4.x.

If you need any assistance, feel free to contact us.

EOL#

The Mini Program will no longer support the following end of life (EOL) JS SDK versions:

Last supported Native versionJS SDK versionEOL
2.35JS SDK ^1.xEOL on 2021-09-09
2.46JS SDK ^2.xEOL on 2022-05-19
2.58JS SDK ^3.xEOL on 2022-12-22
JS SDK ^4.xActive LTS ✅

Breaking changes Summary#

Template tag <style> and <br> is deprecated#

Do not use <style> and <br> tag, use css file instead.

🙅Bad case

Use inline <style>

<View className='index'>   <style dangerouslySetInnerHTML={{ __html: `       .index {        background: #333;      }   `}} />   <View className='index-hd'></View></View>

Use inline <br>

<View className='title'>   Mini Program <br/>Component Demos</View>
Image component#

The style for replacement element like object-fit is not work now. Please use other styles or mode props instead.

The size of Image will not fitting the image size by set width and height to auto.

For each event of image, the event.detail.src removed.

🙅Bad case

Use style object-fit

<Image className='image' src={imageSrc} />
.image {  object-fit: cover;  // 🙅 do not use img only style}

✅Recommend

Use mode

<Image mode='scaleToFill' src={imageSrc} />  // ✅ use mode instead
Text component#

Text component can only nest Text component. Other components in Text component will be disabled now.

🙅Bad case

do not use <View> in <Text>

<Text>   <View>Mini Program</View>   <View>Component Demos</View></Text>

✅Recommend

only <Text> can be used in <Text>

<Text>   <Text>Mini Program</Text>   <Text>Component Demos</Text></Text>
Deprecated legacy code removed#
  • API bn.twoFa removed.
  • global env removed, please use API bn.env instead.
  • app.json entryPage removed, please use entryPagePath instead.
  • error error._code removed, please use error.errno instead.
  • canIUseCustom: string type option like 'myaction' removed, please use { action: 'myaction' } instead.
  • showModal: response.status removed, please use response.confirm/response.cancel instead.
  • request: response.json() removed, please set options.dataType to 'json' and use response.data instead.
  • request: response.text() removed, please use response.data instead.
  • request: thenable return removed, please use options.success/options.fail instead.

To use the new SDK ^4, please re-upload MiniProgram with

  • CLI v2.4.22 $ npm install -g @binance/mp-cli
  • IDE v2.22.0 and select MSV^4.0.2 on IDE

Announcement: End of support for JS SDK <3.0#

Date of announcement: 2022-03-10

Announcing the end of support for JS SDK <3.0. Action required: You need to upgrade to JS SDK ^3.x or later and make sure your Mini Program can run on the latest version of Native with SDK ^3.x.

If you need any assistance, feel free to contact us.

EOL#

Starting May 19th 2022, the Mini Program will no longer support the following end of life (EOL) JS SDK versions:

Last supported Native versionJS SDK versionEOL
2.35JS SDK ^1.xEOL on 2021-09-09
2.46JS SDK ^2.xEOL on 2022-05-19
JS SDK ^3.xActive LTS ✅

Release notes#

The release note for each release. Please also check Release Note for more details.

JS SDK VersionRelease note
2.2.0 -> 3.0.03.0.0 (2021-11-18)
3.0.0 -> 3.1.03.1.0 (2021-12-09)
3.1.0 -> 3.2.43.2.4 (2021-12-30)
3.2.4 -> 3.3.03.3.0 (2022-01-20)
3.3.0 -> 3.4.2 (rollbacked)3.4.0 (2022-02-17)
3.4.2 -> 3.5.03.5.0 (2022-03-10)

Breaking changes Summary#

Image component#

Now default size of Image is width: 320px; height: 240px;

// Image Component size+ width: 320px;+ height: 240px;
Deprecated legacy code removed#
  • Component DeprecatedInput removed, please use Input component instead.
  • Component DeprecatedTextarea removed, please use Textarea component instead.
import {- DeprecatedInput,- DeprecatedTextarea,  Input,  Textarea,} from '@binance/mp-components'
  • API bn.getCurrentPages removed, please use global getCurrentPages function instead.
  • API bn.getApp removed, please use global getApp function instead.
  • API bn.getTabBar removed.
  • requestPayment: options.noncestr removed, please use options.nonceStr instead.
  • request: options.body removed, please use options.data instead.
  • request: options.headers removed, please use options.header instead.
  • connectSocket: options.headers removed, please use options.header instead.
  • SocketTask: callback payload of onOpen changed:
socketTask.onOpen({- headers,+ header} => {})

To use the new SDK ^3, please re-upload MiniProgram with

  • CLI v2.1.3 $ npm install -g @binance/mp-cli
  • IDE v2.12.0 and select MSV^3.2.0 on IDE