Skip to content

Instantly share code, notes, and snippets.

View blackfry's full-sized avatar
🤷‍♂️

Mark Dickie blackfry

🤷‍♂️
  • Cayman Pty Ltd
  • Sydney Australia
View GitHub Profile
@blackfry
blackfry / server.js
Last active May 22, 2017 08:31
server rendered with react router
import React from 'react';
import {renderToString} from 'react-dom/server';
import {StaticRouter} from 'react-router-dom';
import {createStore} from 'redux';
import {Provider}
import 'react-redux';
import reducer from 'reducer.js';
import App from 'App.js';
class FavouriteIcon extends Component {
constructor(props) {
super(props);
FavouriteIcon.defaultProps = {
style: {
position: 'relative',
top: 1,
color: 'grey',
fontSize: '26px'
}
// would like to remove the last object with duplicate value 'bob'
let objects = [{author: 'bob'}, {author: 'shazza'}, {author: 'softy mc dad bod'}, {author: 'cap'}, {author: 'bob'} ]