Skip to content

Latest commit

 

History

History
16 lines (10 loc) · 319 Bytes

File metadata and controls

16 lines (10 loc) · 319 Bytes

solid-use/atom

A simplified version of createSignal. Instead of returning a tuple, it returns a single function that serves as the accessor and the dispatcher.

import atom from 'solid-use/atom';

const message = atom('Hello');

createEffect(() => {
  console.log(message());
});

message('Bonjour');