2.3 KiB
2.3 KiB
id | title | challengeType | isRequired | videoUrl | localeTitle |
---|---|---|---|---|---|
5a24c314108439a4d403614a | Moving Forward From Here | 6 | false | 从这里前进 |
Description
import
语句(这些语句提取了在挑战中为您提供的所有依赖项)。 “使用npm管理包”部分更详细地介绍了npm。最后,编写React和Redux代码通常需要一些配置。这可能很快变得复杂。如果您有兴趣在自己的机器上进行实验,可以配置Create React App并准备就绪。或者,您可以在CodePen中启用Babel作为JavaScript预处理器,将React和ReactDOM添加为外部JavaScript资源,并在那里工作。 Instructions
'Now I know React and Redux!'
到控制台。 Tests
tests:
- text: 消息<code>Now I know React and Redux!</code>应该登录到控制台。
testString: 'assert(editor.getValue().includes("console.log("Now I know React and Redux!")") || editor.getValue().includes("console.log(\"Now I know React and Redux!\")"), "The message <code>Now I know React and Redux!</code> should be logged to the console.");'
Challenge Seed
// import React from 'react'
// import ReactDOM from 'react-dom'
// import { Provider, connect } from 'react-redux'
// import { createStore, combineReducers, applyMiddleware } from 'redux'
// import thunk from 'redux-thunk'
// import rootReducer from './redux/reducers'
// import App from './components/App'
// const store = createStore(
// rootReducer,
// applyMiddleware(thunk)
// );
// ReactDOM.render(
// <Provider store={store}>
// <App/>
// </Provider>,
// document.getElementById('root')
// );
// change code below this line
Solution
// solution required