Build a Random Quote Machine

Tell us what’s happening:
hello. can somebody help me ???
i want to use react redux react-redux to finish this change , but when click the button, it doesn’t work ,
what’s wrong with my code??

Your code so far

import React from 'react';
import ReactDOM from 'react-dom';
import 'materialize-css/dist/css/materialize.css';
import 'materialize-css/dist/js/materialize.js';
import {Provider,connect} from 'react-redux';
import {createStore} from 'redux';

const words=[
    'In my dual profession as an educator and health care provider, I have worked with numerous children infected with the virus that causes AIDS. ',
    'The relationships that I have had with these special kids have been gifts in my life. They have taught me so many things, but I have especially learned that great courage can be found in the smallest of packages. Let me tell you about Tyler.',
    'Tyler was born infected with HIV: his mother was also infected. From the very beginning of his life, he was dependent on medications to enable him to survive. When he was five',
    'he had a tube surgically inserted in a vein in his chest. This tube was connected to a pump, which he carried in a small backpack on his back. ',
    'Medications were hooked up to this pump and were continuously supplied through this tube to his bloodstream. At times, he also needed supplemented oxygen to support his breathing.',
    'Tyler wasn’t willing to give up one single moment of his childhood to this deadly disease. It was not unusual to find him playing and racing around his backyard,',
    'wearing his medicine-laden backpack and dragging his tank of oxygen behind him in his little wagon. All of us who knew Tyler marveled at his pure joy in being alive and the energy it gave him. Tyler’s mom often teased him by telling him that he moved so fast she needed to dress him in red.',
    'That way, when she peered through the window to check on him playing in the yard, she could quickly spot him.',
    'This dreaded disease eventually wore down even the likes of a little dynamo like Tyler. He grew quite ill and, unfortunately',
    ' When it became apparent that he wasn’t going to survive, Tyler’s mom talked to him about death. She comforted him by telling Tyler that she was dying too,'
const colors=[
const authors=[
let aa=Math.floor(Math.random()*10);
const actionCreator=()=>{
const defaultState={
    word:' When it became apparent that he wasn’t going to survive, Tyler’s mom talked to him about death. She comforted him by telling Tyler that she was dying too,',
const reducer = (state =defaultState , action) => {
    switch (action.type) {
        case 'UUU':
            return {
            return state;
const store=createStore(reducer);

class Web extends React.Component{
    constructor(props) {
    setTimeout(() => {

           <div id='quote-box' className='container center'>
             <section style = {{backgroundColor: this.props.color,width:'100%',height:300}}>
                <div style={{paddingTop:20}}>
                <blockquote id='text'>“{this.props.word}”</blockquote>
                <blockquote id='author'>“{}”</blockquote>
                <a id='tweet-quote' href='' style={{marginTop:120,marginRight:20}} className='waves-effect waves-light btn red'>Twitter</a>
                <a style={{marginTop:120,marginRight:20}} className='btn waves-effect waves-light yellow'>b</a>
                <a id='new-quote' style={{marginTop:120}} className='btn waves-effect waves-light green' onClick={this.ddd}>NEXT</a>
             <b>by hutu zhu</b>

// react-redux
const mapStateToProps = (state=defaultState) => {
    return defaultState;
const mapDispatchToProps = (dispatch) => {
    return {
        onClick: () => {
const Contain=connect(mapStateToProps,mapDispatchToProps)(Web);
class Wrapper extends React.Component{
    <Provider store={store}>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:

Do you have your project on CodePen? It’s not easy to debug code just by reading it.

Also, I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


thank you @PortableStick,

this is my Codepen address, please help me.

You have some issues to address in order to get the project to work. Make sure you’re adding React, React-DOM, and other dependencies as required. Also make sure that you’re properly referencing those dependencies in your code.