<commit_before>import React from "react";

const BACKEND_URL = 'http://localhost:7000/greetings';

export default class GreetingDisplayController extends React.Component {
    componentDidMount() {
        this.loadGreeting(this.props);
    }

    componentWillReceiveProps(nextProps) {
        this.loadGreeting(nextProps);
    }

    loadGreeting(props) {
        const {params} = this.props;

        fetch(`${BACKEND_URL}/${params.greetingId}`)
            .then(response => response.json())<commit_msg>router v3: display used to be delayed to previous greeting<commit_after>import React from "react";

const BACKEND_URL = 'http://localhost:7000/greetings';

export default class GreetingDisplayController extends React.Component {
    componentDidMount() {
        this.loadGreeting(this.props);
    }

    componentWillReceiveProps(nextProps) {
        this.loadGreeting(nextProps);
    }

    loadGreeting(props) {
        const {params} = props;

        fetch(`${BACKEND_URL}/${params.greetingId}`)
            .then(response => response.json())
{'fraction_non_alphanumeric': 0.11764705882352941, 'fraction_numerical': 0.008538899430740038, 'mean_word_length': 3.4893617021276597, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3830919', 'n_tokens_mistral': 313, 'n_tokens_neox': 307, 'n_words': 56}