This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constructor(props) { | |
super(props); | |
this.user = undefined; | |
this.bot = { id: "0", name: "bot" }; | |
this.state = { | |
messages: [ | |
{ | |
author: this.bot, | |
timestamp: new Date(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App extends React.Component { | |
render() { | |
return ( | |
<div className="App"> | |
<h1>Conversational UI</h1> | |
<Chat placeholder={"Type here..."} width={400}></Chat> | |
</div> | |
); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
export const findShipments = (location, locationIsGeoLocation) => async (dispatch) => { | |
dispatch(asyncRequest({reducerName})) | |
const store = getStore() | |
const promises = [ | |
store.shipment.find({location, locationIsGeoLocation}) | |
] | |
// If the location is a geo location we need to filter the shipments to only | |
// include those that are valid locations for the users geo location. This way | |
// we exclude shipments for locations that the user does not have the funder. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.js is a framework for building web applications. It has a reactivity system that allows you to model and manage your application state such that when data changes, it's reflected in the UI, without you having to query the DOM. It's reactivity system makes state management simple and easy. With all the buzz around JS frameworks, you may have read about Vue and want to get into using Vue as a developer familiar withjQuery. Perhaps, you just keep seeing things about Vue appear in your favorite newsletters and you're wondering how you can make the transition to Vue. In this post, I'll show you fundamental components of Vue that you need to know to get started with as a jQuery developer. | |
# Adding Vue.js to your app | |
The first thing you do is to add a reference to Vue.js to (In or to?) your project. There are various ways you can do this but I'll focus on using a script reference on the page. So add `<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>` to your page. Once added, you then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ChatHub : Hub | |
{ | |
private readonly Container _container; | |
public ChatHub(Container container) | |
{ | |
_container = container; | |
} | |
public override Task OnConnected() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// License: Apache 2.0 | |
// A generic base repository which other repositories (if needed) can inherit from | |
public class BaseRepository<TEntity> : IEntityRepository<TEntity> where TEntity : class | |
{ | |
internal DataContext context; | |
internal DbSet<TEntity> dbSet; | |
public BaseRepository(DataContext context) | |
{ |
NewerOlder