
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
有關更多信息,請參見有關部署的部分。
愉快的編碼:)