
Bhanwari Devi是一位被压迫的妇女,她敢于与拉贾斯坦邦农村的封建,种姓和父权制结构作斗争。她最初是一名社会工作者,是政府经营的妇女发展项目的一部分。 1992年,她参与了针对童婚的具体运动。她向妇女咨询了计划生育,女孩教育,针对女性杀人,嫁妆和童婚。由于她的行动主义,她和她的家人已经受到了村庄中主导的种姓男人的不断威胁和恐吓。
一旦她干预以停止从一个占主导地位的种姓家族的一个九个月大的婴儿的婚姻。这激怒了村里的主要种姓男人。尽管知道可能的后果,但她敢于继续反抗他们并代表正确的事物。同年,在一次报复行动中,她在野外工作时被绑架,丈夫在殴打。
在随后的正义追求中,她面临巨大障碍的途中的每一步。在派出所,初级卫生保健中心和司法机构。在这里阅读有关她的更多信息。
我们欢迎大家。 ?

请参阅我们的贡献指南。
├── src # Source files
├──asset # assets that belongs commonly in all components.
├──components # Components and their child components.
├──Course # Course component and it's child components
├──index.js
├──styles.scss
├──constants.js
├──CreateCourse #Course realted child component
├──CourseForm
├──index.js
├──styles.scss
├──CourseList
├──redux # all the redux and api related things to Course, we will do under redux directory.
├──action.js # We will define redux actions here
├──api.js # All the course related APIs(axios requests) will happen here
├──reducer.js # All the course related state management will happen here
├──saga.js # All the middlewares for redux state management or api calls we will put here
├──util.js # Mapper functions or any utility function for data manipulation
├──common # All the common components which might be used anywhere in the app.
├──Notification
├──index.js
├──styles.scss
├──Spinner
├──index.js
├──styles.scss
├──pages # root level containers for each page(Individual component wrapper for different url rotue)
├──CourseList # these are basically wrappers, they should't me more than 30-40 lines.
├──index.js
├──styles.scss
├──routing # Creating public and private routes for different pages.
├──services # Tools and utilities for date, time, string and numbmers
├──sass # app color css reference and mixins.
├──docs # Some documentation about code and other things.
├──.env.development # development environment variables.
├──package.json
├──package-lock.json
├── README.md
例如,我们的组件目录称为Course 。与课程实体直接相关的所有API,REDUX,REDUX-SAGA和常数都将进入Course组件目录。因此,如果有人使用与课程相关的东西,我们希望他们始终留在Course目录中。基本上是在下面的文件结构中。
├──components
├──Course
├──index.js
├──styles.scss
├──constants.js
├──ChildComponent
├──CourseList
├──redux
├──action.js
├──api.js
├──reducer.js
├──saga.js
├──util.js
├──AnotherChildComponent
注意:全局常数将进入全局src/constant.js文件。

注意:我们可以引导您了解如何使用Redux和Redux-Saga。请取得联系,我们可以为您提供Redux和Redux-Saga的简短简介。
saga.js )中的响应远离UI逻辑。新的Redux,从这里开始学习action.js )reduceer.js )api.js )调用[注意:使用本地存储做某事时不适用。]saga.js )TODO:添加视觉图像如何相互作用。
当您实现API调用时,您可以想到此流程。: - >
Create actions
Create redux state
Create the API function
Create middlewares(saga)
操作是告诉Redux要更新哪个事件的一种方式。基本上它们有一个结构,如下。
{ type: 'INCREASE_COUNT', data: 5}
This above object will passed to redux through some function/API(aka Disptacher),
and the intuitive behaviour of this `action` should be that it increments `counter` variable in redux by 5.
当我们进行API调用时,通常会处理三种操作。
src/components/componentName/redux/action.js文件。让我们以获取用户信息的示例。以及我们如何定义获取用户信息的操作。动作应该看起来像这样。 export const types = {
GET_USER_INTENT: 'GET_USER_INTENT',
GET_USER_INTENT_RESOLVED: 'GET_USER_INTENT_RESOLVED',
GET_USER_INTENT_REJECTED: 'GET_USER_INTENT_REJECTED',
}
export const actions = {
getUser(data) {
return {
type: types.GET_USER_INTENT,
data,
}
},
getUserResolved(data) {
return {
type: types.GET_USER_INTENT_RESOLVED,
data,
}
},
getUserRejected(error) {
return {
type: types.GET_USER_INTENT_REJECTED,
error,
}
},
}
对于与状态相关的事物(保持API Rensponse数据和错误引用),我们在src/components/componentName/redux/reducer.js中创建和管理状态。代码看起来像这样。 ?
import { types } from './action'
const initialState = {
loading: false,
error: false,
data: null,
}
export default (state = initialState, action) => {
switch (action.type) {
case types.GET_USER_INTENT:
return {
...state,
loading: true,
error: false,
data: null,
}
case types.GET_USER_INTENT_RESOLVED:
return {
...state,
loading: false,
error: false,
data: action.data, // mapped user data.
}
case types.GET_USER_INTENT_REJECTED:
return {
...state,
loading: false,
error: action.error, // keeping reference of the error, When API call fails.
data: null,
}
default:
return state
}
}
为了从服务器获取数据,我们在此处创建API调用。通常,我们使用axios库。创建API的文件路径看起来像src/components/componentName/redux/api.js 。 API呼叫看起来像这样。 ?
import axios from 'axios'
import { METHODS, HeaderFactory } from '../../../services/api'
/**
* gets user data from the server.
*
* @param {opts}
* @param {object} opts
* @returns {Promise}
*/
export const getUserData = (opts, tokens) => {
return axios({
url: `${process.env.REACT_APP_MERAKI_URL}/users/${opts.userId}`,
method: METHODS.GET,
headers: HeaderFactory(tokens)
})
}
当我们谈论处理异步/API调用时,Middlewares非常有用。我们将SAGA MiddleWares放入src/components/componentName/redux/saga.js文件中。它使处理REDUX状态变得容易且直接。首先,它看起来可能有点麻烦或长。但是,在创建了两个或三个API呼叫之后,您将掌握它。这就是我们如何通过Redux Saga中间件来处理用户数据的方式。
import { takeLatest, put, call } from 'redux-saga/effects'
import { types, actions } from './action'
import { authorizeRequest, httpStatuses } from '../../../services/auth'
import { getUserData } from './api'
/**
* This handles gets user data from the server
* @param {object} data user information
* @param {object} data.userId user id which will be used to get user information
*/
function* handleGetUserData({ data }) {
const res = yield call(authorizeRequest, getUserData, data)
if(httpStatuses.SUCCESS.includes(res.status)) {
// if the api call was succesful, let's change the status according // to that. also setting `loading` as false.
yield put(actions.getUserResolved(res.data))
} else {
// if the api call wasn't successful, let's set the error in redux /// for refernce.also setting `loading` as false.
yield put(actions.getUserRejected(res))
}
}
export default function* () {
// This action `types.GET_USER_INTENT` is also handled in the redux
// it sets `loading` as true. so we can show some loader when the API call
// is happening.
yield takeLatest(types.GET_USER_INTENT, handleGetUserData)
}
注意:很快,我们将在此处添加造型CSS的方式。
如果您仍然有一些疑问或建议,即该项目中的工作原理。请随时与Vikash,Saquib,Komal或Abhishek联系。我们很乐意接听电话,并使您更加清晰。毕竟,您正在尝试与我们一起建造东西。
.env.development开发的文件才能在本地开始运行该项目并开发。请与我们联系。如果您有兴趣帮助我们。 在项目目录中,您可以运行:
npm start在开发模式下运行该应用程序。
打开http:// localhost:3000在浏览器中查看。
如果您进行编辑,该页面将重新加载。
您还将在控制台中看到任何棉绒错误。
npm test在交互式手表模式下启动测试跑者。
有关更多信息,请参见有关运行测试的部分。
npm run build将应用程序构建到build文件夹中。
它正确地捆绑了在生产模式下进行反应,并优化构建以获得最佳性能。
构建被缩小,文件名包括哈希。
您的应用已准备好部署!
要在本地环境中运行生产构建,请在npm run build后运行遵循代码。 [注意:确保您在.env.production文件中具有所有生产环境变量。]
npm install -g serve
serve -s build
有关更多信息,请参见有关部署的部分。
愉快的编码:)