cerebral / overmind-website Goto Github PK
View Code? Open in Web Editor NEWThe Overmind website
The Overmind website
I found some typos on https://overmindjs.org/core/typescript
For exammple, the following code:
import { derived } from 'overmind'
type State = {
foo: string
shoutedFoo string
}
export const state: State = {
foo: 'bar',
shoutedFoo: derived<State, string>(state => state.foo + '!!!')
}
I think shoutedFoo string
should be shoutedFoo: string
. There is a missing colon. There are bunch of other code blocks where there is a missing colon :)
hello, everyone, I have a problem, I have used overmind js lately and I have a problem, if I have an overmind js effect that fetches API data and stores it in the overmind state, how can i access this data and put some of this data in react state hook inside the component
Personally, I think the configuration section on the TypeScript page, is a little confusing and assumes knowledge of a TypeScript feature that is not widely understood. (By me, up to now, anyway!)
Under Explicit Typing section the note says the 'The Overmind documentation is written for implicit typing'.
Is implicit typing the Declare module approach?
At first, I did not understand what typeof was doing here:
// Due to circular typing we have to define an
// explicit typing of state, actions and effects since
// TS 3.9
export interface Config extends IConfig<{
state: typeof config.state,
actions: typeof config.actions,
effects: typeof config.effects
}> {}
I only understood the code (I hope!) after reading this article.
I think the documentation may benefit from the following blurb, or similar.
// Note: The typeof keyword is being used here by TypeScript to type query
// the configuration.
// (It is NOT being used by JavaScript to return the type of the operand
// as a string.)
// See https://mariusschulz.com/blog/type-queries-and-typeof-in-typescript for
// an explanation of the differences between typeof in TypeScript and JavaScript.
I am happy to submit a pull request for the above, but I thought I would get some feedback first, and ascertain whether I have properly understood the concepts.
Whatever www.overmindjs.org is pointing to is broken. overmindjs.org without the www works fine.
$ nslookup www.overmindjs.org
Server: 2601:646:c400:a810:22c9:d0ff:fe99:5cc4
Address: 2601:646:c400:a810:22c9:d0ff:fe99:5cc4#53
Non-authoritative answer:
www.overmindjs.org canonical name = 0rjvu8x6.easyredirengine.com.
Name: 0rjvu8x6.easyredirengine.com
Address: 34.213.106.51
Name: 0rjvu8x6.easyredirengine.com
Address: 54.68.182.72
vs.
$ nslookup overmindjs.org
Server: 2601:646:c400:a810:22c9:d0ff:fe99:5cc4
Address: 2601:646:c400:a810:22c9:d0ff:fe99:5cc4#53
Non-authoritative answer:
overmindjs.org canonical name = hosting.gitbook.com.
hosting.gitbook.com canonical name = fasthosting.gitbook.com.
Name: fasthosting.gitbook.com
Address: 104.236.176.100
Svelte is missing in Quickstart page: https://overmindjs.org/quickstart.
In Svelte Reactions example here: https://overmindjs.org/views/svelte#reactions, where the store
comes from?
<script>
import { state, actions, reactions } from './overmind.js'
$: count = $state.count
let doubled = undefined
store.reaction(
(state) => state.count,
(value) => {
doubled = value * 2
},
{
immediate: true
}
)
</script>
<p>Count: {count}</p>
<p>Doubled: {doubled}</p>
<button id="increase" on:click={() => store.actions.increase()}>Increase</button>
<button id="decrease" on:click={() => store.actions.decrease()}>Increase</button>
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.