Code Monkey home page Code Monkey logo

reactjs-quiz's Introduction

ReactJS-Quiz

This is a quiz framework created using ReactJS.

Following is a sample JSON data model which could be posted to create the quiz:

var test = {
		name: "Sample Test",
		description: "This is a sample test paper to demonstrate the ReactJS UI design by components.",
		passCutoff: 0.33,		
		applyNegativeMarking: false,
		questions: [
			{
			no: "1",
			qtext:"California is in which part of USA?",
			options:[
				{text:"East"},
				{text:"Mid"},
				{text:"West"},
				{text:"South"}
			],
			ans:"West",
			marks: 3
		},
		{
			no: "2", 
			qtext:"Who is the Prime Minister of India?",
			options:[
				{text:"Sonia Gandhi"},
				{text:"Narendra Modi"},
				{text:"Manmohan Singh"},
				{text:"Rahul Gandhi"}
			],
			ans:"Narendra Modi",
			marks: 2
		},
		{
			no: "3",
			qtext:"Which of the following is most popular Search Engine Company?",
			options:[
				{text:"Microsoft"},
				{text:"Facebook"},
				{text:"Google"},
				{text:"Yahoo"}
			],
			ans:"Google",
			marks: 1
		},
		]
	};	

The above Test JSON object could then be passed to Test Component like following:

React.render( <Test details={test}/>, document.getElementById( "content" ) );

reactjs-quiz's People

Contributors

eajitesh avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.