Skip to content

Can't change title #133

Open
Open
@dnish

Description

@dnish

Hey,
I'm having an issue when I try to change the title of the header. For example my app component looks like this:

class App extends Component {

    constructor(props) {
        super(props);
        this.state = {
            headerName:'Erster Aufruf'
        };
    }






    componentDidMount() {
        setTimeout(() => {
            this.setState({headerName:'New title'});
        },5000);


    }


    componentWillUpdate() {
        alert('Will update');
    }
    render() {

        return (

        <Router
            firstRoute={{

            component:Dashboard,
            headerStyle: {backgroundColor: '#48cfad'},
            name:this.state.headerName
            }}
        />
        );
    }
}

After changing the state, componentWillUpdate fires but the title in the header still remains the same.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions