unleash-proxy-client
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -9,3 +9,3 @@ { | ||
"react-scripts": "3.1.1", | ||
"unleash-proxy-client": "^0.0.3" | ||
"unleash-proxy-client": "^0.0.4" | ||
}, | ||
@@ -12,0 +12,0 @@ "scripts": { |
@@ -5,7 +5,8 @@ import React from 'react'; | ||
function App() { | ||
function App({unleash}) { | ||
const showToggle = unleash.isEnabled('proxy.demo'); | ||
return ( | ||
<div className="App"> | ||
<header className="App-header"> | ||
<img src={logo} className="App-logo" alt="logo" /> | ||
{showToggle ? <img src={logo} className="App-logo" alt="logo" /> : null} | ||
<p> | ||
@@ -12,0 +13,0 @@ Edit <code>src/App.js</code> and save to reload. |
@@ -6,14 +6,12 @@ import React from 'react'; | ||
import * as serviceWorker from './serviceWorker'; | ||
import * as unleash from 'unleash-proxy-client/build/index.js'; | ||
import UnleashClient from 'unleash-proxy-client'; | ||
console.log(unleash); | ||
/* | ||
var config = {url: 'https://eu.unleash-hosted.com/hosted/api', clientKey: 'lkasjda'}; | ||
var context = {userId: '1233'}; | ||
const config = {url: 'https://eu.unleash-hosted.com/hosted/api', clientKey: 'some-key'}; | ||
const context = {userId: '1233'}; | ||
var client = new UnleashClient(config, context); | ||
client.start(); | ||
*/ | ||
ReactDOM.render(<App />, document.getElementById('root')); | ||
const unleash = new UnleashClient(config, context); | ||
unleash.start(); | ||
ReactDOM.render(<App unleash={unleash} />, document.getElementById('root')); | ||
// If you want your app to work offline and load faster, you can change | ||
@@ -20,0 +18,0 @@ // unregister() to register() below. Note this comes with some pitfalls. |
{ | ||
"name": "unleash-proxy-client", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "A browser client that can be used together with the unleash-proxy.", | ||
@@ -5,0 +5,0 @@ "main": "./build/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
483280
495