I have problems with the special characters in react

0

I have an application built with asp.net core where I use react with redux but I have problems in the visualization of some special characters.

It turns out that I have a component

import React, { Component } from 'react';
import './media.css';

class Media extends Component {
    render() {
        return (
            <div className="row">
                <div className="col s12 m3">
                    <div className="card">
                        <div className="card-image">
                            <img src="./images/covers/bitcoin.jpg" alt="" />
                        </div>
                        <div className="card-content">
                            <p>{this.props.title}</p>
                            <p>{this.props.author}</p>
                        </div>
                        <div className="card-action center-align">
                            <a className="waves-effect waves-light btn" href="#">Compartir</a>
                        </div>
                    </div>
                </div>
            </div>
        )
    }
}

export default Media;

And in my index.js I have the following:

render(
<Media title="¿Qué es responsive Design?" author="autor"/>,
rootElement);

From here I pass the data dynamically to my component but when the text is rendered I get strange characters.

In my index.html file I have the meta tags of utf-8 but still I have this error. An important fact to keep in mind is that when I put the text directly on the labels of my component this works well and I have no problems with special characters.

Who could help me or guide me on this topic ...?

    
asked by vcasas 22.11.2018 в 14:26
source

0 answers