Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

[BUG] watch 模式下 onShow onHide 等生命周期未触发 #913

Closed
noyobo opened this issue May 9, 2020 · 0 comments
Closed

[BUG] watch 模式下 onShow onHide 等生命周期未触发 #913

noyobo opened this issue May 9, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@noyobo
Copy link
Contributor

noyobo commented May 9, 2020

bug 描述
npm run dev wechat onShow onHide 等 page 生命周期未触发

复现步骤

  1. npx create-remax-app my-app && yarn install
  2. 修改 home/index
import * as React from 'react';
import { View, Text, Image } from 'remax/one';
import styles from './index.css';

export default class Home extends React.Component {
  onShow(){
    console.log('show')
  }
  onHide(){
    console.log('hide')
  }
  onReady(){
    console.log('ready')
  }
  render() {
    return (
      <View className={styles.app}>
        <View className={styles.header}>
          <Image
            src="https://gw.alipayobjects.com/mdn/rms_b5fcc5/afts/img/A*OGyZSI087zkAAAAAAAAAAABkARQnAQ"
            className={styles.logo}
            alt="logo"
          />
          <View className={styles.text}>
            编辑 <Text className={styles.path}>src/pages/index/index.js</Text>{' '}
            开始
          </View>
        </View>
      </View>
    );
  }
}
  1. yarn dev wechat

期望结果

onShow, onHide 生命周期触发。与 build 模式一致。

版本信息:

  • remax 版本: 2.0.3
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants