byumark / sam-library-frontend Goto Github PK
View Code? Open in Web Editor NEWFront-end for Serverless Application Model course on Pluralsight.
Front-end for Serverless Application Model course on Pluralsight.
Uncaught SyntaxError: The URL 'http:/sockjs-node' is invalid at new SockJS (sockjs.js:678) at new SockJSClient (SockJSClient.js:39) at initSocket (socket.js:20) at Object.<anonymous> (index.js:176) at Object.../../webpack-dev-server/client/index.js?http://[http://localhost]:3000 (index.js:45) at __webpack_require__ (bootstrap:726) at fn (bootstrap:100) at Object.1 (shared.js:120) at __webpack_require__ (bootstrap:726) at bootstrap:793
The following is the result of running yarn install
and yarn start
after adding
a url to config.js
like so:
export default {
apiRoot: "https://ip6random.execute-api.eu-west-3.amazonaws.com/Stage"
};
If your dont add the url to config.js, you dont get the error.
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of `BookItem`.
44 | axios(`${config.apiRoot}/books`, {
45 | method: "GET"
46 | }).then(response => {
> 47 | this.setState({
48 | books: response.data.sort((a, b) => {
49 | if (a.title < b.title) return -1;
50 | if (a.title > b.title) return 1;
Seems simple enough to fix. Will post if I get to it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.