Skip to content

Instantly share code, notes, and snippets.

@nfxgosu
nfxgosu / Card.tsx
Created November 12, 2021 07:36
How do I pass props correctly?
import React from 'react'
import { Card, Icon, Image } from 'semantic-ui-react'
interface Herbs {
id: string
name: string
img: string
details: string
}
@nfxgosu
nfxgosu / 007_applyAssertEqual_A.js
Created May 25, 2017 03:49
007_applyAssertEqual_A
describe('assertEqual', function() {
it('should square a positive number', function assertEqual(actual, expected, testName) {
actual = JSON.stringify(actual);
expected = JSON.stringify(expected);
if (actual === expected) {
console.log('passed');
} else {
console.log(`FAILED [${testName}] expected '${expected}', but got '${actual}'`);
}
});
@nfxgosu
nfxgosu / webpack.config.js
Created April 2, 2017 02:32
So I put the use: part under "loader: "style-loader!css-loader""?
var HTMLWebpackPlugin = require('html-webpack-plugin');
var HTMLWebpackPluginConfig = new HTMLWebpackPlugin({
template: __dirname + '/app/index.html',
filename: 'index.html',
inject: 'body'
});
module.exports = {
entry: __dirname + '/app/index.js',
module: {
@nfxgosu
nfxgosu / package.json
Created April 1, 2017 22:28
Package.json
{
"name": "vishnu-gottimukkala",
"version": "1.0.0",
"description": "sonicTrader",
"main": "index.js",
"dependencies": {
"babel-core": "^6.24.0",
"babel-loader": "^6.4.1",
"babel-preset-react": "^6.23.0",
"radium": "^0.18.2",
@nfxgosu
nfxgosu / Navbar.js
Last active April 1, 2017 22:21
Module not found: Error: Can't resolve 'styles.css' in NavBar.js
import React from 'react';
import autoBind from 'react-autobind';
import styles from 'styles.css';
const baseUrl = 'http://www.sonicTrader.com'
const path = 'Product Features Reviews Pricing Contact'.split(' ')
class Logo extends React.Component{
render() {
return (