serialize-javascript
geotic
serialize-javascript | geotic | |
---|---|---|
2 | 1 | |
2,788 | 175 | |
0.5% | - | |
5.2 | 1.5 | |
about 1 month ago | 11 months ago | |
JavaScript | JavaScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
serialize-javascript
-
Trying and failing to implement react redux persistence
and this is my config for the plugin: { resolve:gatsby-plugin-react-redux-persist, options: { // [required] - path to your createStore module pathToCreateStoreModule: './src/store', // [optional] - options passed toserialize-javascript // info: https://github.com/yahoo/serialize-javascript#options // will be merged with these defaults: serialize: { space: 0, // ifisJSONis set tofalse,evalis used to deserialize redux state, // otherwiseJSON.parseis used isJSON: true, unsafe: false, ignoreFunction: true, }, // [optional] - if true will clean up after itself on the client, default: cleanupOnClient: true, // [optional] - name of key onwindowwhere serialized state will be stored, default: windowKey: '__PRELOADED_STATE__', }, },
-
How to load the correct data on the server-side with React and Redux
We pass the entire state to the client-side via a script tag in the html document by using the serialize() function in the serialize-javascript package. (This javascript parser allows us to parse more object types like a Date so I would recommend to use that package instead of the JSON.stringify() function.) On the client-side we can now read the window.initialState object and parse it to the Redux store.
geotic
-
What programming "paradigm" do you guys use for your ASCII / Roguelike games?
If you're using javascript I can't recommend geotic highly enough. I've used it on a bunch of games myself and have always had a pretty good experience. It's not a pure ECS architecture as it encourages logic in your components and events but that's mostly because it's based on talks given by the devs from ADOM and COQ - both of which seem to use ECS-like architecture. The repo has some nice example projects worth a look.
What are some alternatives?
blogpost-example-react-ssr - Loading the right data on the server-side with respect to nested components, react-redux (and react-router)
bitECS - Functional, minimal, data-oriented, ultra-high performance ECS library written in JavaScript
normalizr - Normalizes nested JSON according to a schema [Moved to: https://github.com/paularmstrong/normalizr]
entity-system-js - ensy - A very simple Entity System for JavaScript
Express - Fast, unopinionated, minimalist web framework for node.
stampadia - A daily print-and-play roguelike adventure you can play offline.
SheetJS js-xlsx - 📗 SheetJS Spreadsheet Data Toolkit -- New home https://git.sheetjs.com/SheetJS/sheetjs
nodebestpractices - :white_check_mark: The Node.js best practices list (February 2024)
js-xlsx - :green_book: SheetJS Community Edition -- Spreadsheet Data Toolkit [Moved to: https://github.com/SheetJS/sheetjs]
DuckEngine - A 2D Game Engine for the web.